Add routine to backup IVT

This commit is contained in:
Nero 2019-03-24 17:59:03 +00:00
parent 0414af640a
commit bcff1efe59

View File

@ -1,3 +1,25 @@
; out ds:si copy of interrupt table
ivt_backup:
push ax
push cx
push di ; backup original value
push ds
mov ax, 0x80
call malloc
push di
mov cx, 0x80
mov ax, cs
mov es, ax
mov si, 0x0000
mov ds, si
rep movsb
pop si ; this was di after malloc
pop ds
pop di ; restore original di
pop cx
pop ax
ret
; set item in interrupt vector table ; set item in interrupt vector table
; in: bx interrupt number ; in: bx interrupt number
; ds:dx new handler address ; ds:dx new handler address