35 lines
413 B
NASM
35 lines
413 B
NASM
|
[bits 32]
|
||
|
global isr128
|
||
|
extern isr_handler
|
||
|
extern _push_regs
|
||
|
extern _pop_regs
|
||
|
|
||
|
isr128:
|
||
|
cli
|
||
|
call _push_regs
|
||
|
|
||
|
push ds
|
||
|
push es
|
||
|
push fs
|
||
|
push gs
|
||
|
|
||
|
mov ax, 0x10
|
||
|
mov ds, ax
|
||
|
mov es, ax
|
||
|
mov fs, ax
|
||
|
mov gs, ax
|
||
|
|
||
|
; Pass register state to C handler
|
||
|
push esp
|
||
|
call isr_handler
|
||
|
add esp, 4
|
||
|
|
||
|
pop gs
|
||
|
pop fs
|
||
|
pop es
|
||
|
pop ds
|
||
|
call _pop_regs
|
||
|
|
||
|
sti
|
||
|
iret
|