rdos/kernel/intr.asm
2019-03-31 20:54:51 +00:00

34 lines
435 B
NASM

ivt_backup:
push ds
push es
xor ax, ax
mov ds, ax
mov es, ax
mov si, ax
mov di, 0x0100 ; int 0x40 address
mov cx, 0x0040 ; 0x20 interrupts * 2 words
repe movsw
pop es
pop ds
ret
; set item in interrupt vector table
; in: bx interrupt number
; ds:dx new handler address
ivt_set:
push es
push ax
xor ax,ax
mov es,ax
sal bx,1
sal bx,1
mov [es:bx], dx
mov [es:bx+2], cs
pop ax
pop es
ret