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
|
|
|
|
|
2019-03-14 17:17:02 +01:00
|
|
|
; set item in interrupt vector table
|
|
|
|
; in: bx interrupt number
|
2019-04-01 00:58:19 +02:00
|
|
|
; cs:dx new handler address
|
2019-03-14 17:17:02 +01:00
|
|
|
ivt_set:
|
|
|
|
push ax
|
2019-04-01 00:58:19 +02:00
|
|
|
push es
|
2019-03-14 17:17:02 +01:00
|
|
|
|
|
|
|
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
|
2019-03-14 17:17:02 +01:00
|
|
|
|
|
|
|
pop es
|
2019-04-01 00:58:19 +02:00
|
|
|
pop ax
|
2019-03-14 17:17:02 +01:00
|
|
|
ret
|