rdos/kernel/intr.asm

34 lines
435 B
NASM
Raw Normal View History

2019-03-24 18:59:03 +01:00
ivt_backup:
push ds
2019-03-31 22:54:51 +02:00
push es
xor ax, ax
mov ds, ax
2019-03-24 18:59:03 +01:00
mov es, ax
2019-03-31 22:54:51 +02:00
mov si, ax
mov di, 0x0100 ; int 0x40 address
mov cx, 0x0040 ; 0x20 interrupts * 2 words
repe movsw
pop es
2019-03-24 18:59:03 +01:00
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
2019-03-31 22:54:51 +02:00
mov [es:bx+2], cs
pop ax
pop es
ret