Add routine to backup IVT
This commit is contained in:
parent
0414af640a
commit
bcff1efe59
@ -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
|
||||
; in: bx interrupt number
|
||||
; ds:dx new handler address
|
||||
|
Loading…
Reference in New Issue
Block a user