diff --git a/kernel/intr.asm b/kernel/intr.asm index 5054a0c..8da59e2 100644 --- a/kernel/intr.asm +++ b/kernel/intr.asm @@ -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