rdos/kernel/intr.asm

31 lines
379 B
NASM
Raw Normal View History

; Register a interrupt handler (21h AH=25h)
; in: AL interrupt number
; DS:DX far ptr
isr_intr_register:
; backup previous stos ptr
push es
push di
; DI = AL * 4
mov ah, 4
mul ah
mov di, ax
; ES = 0
xor ax, ax
mov es, ax
; store offset
mov ax, dx
stosw
; store segment
mov ax, ds
stosw
; restore previous stos ptr
pop di
pop es
iret