HariboteOS/day28/kernel/pm.asm
2021-06-01 21:15:52 +08:00

17 lines
337 B
NASM

[BITS 32]
GLOBAL load_gdtr, load_idtr
[SECTION .text]
load_gdtr: ; void load_gdt(int limit, int addr);
MOV AX, [ESP+4] ; limit
MOV [ESP+6], AX
LGDT [ESP+6]
RET
load_idtr: ; void load_idt(int limit, int addr);
MOV AX, [ESP+4] ; limit
MOV [ESP+6], AX
LIDT [ESP+6]
RET