Routine for loading far ptr from IVT

This commit is contained in:
Nero 2019-09-01 14:05:40 +00:00
parent 809a959608
commit de90b9cfd1
1 changed files with 26 additions and 0 deletions

View File

@ -32,3 +32,29 @@ intr_register:
pop es
pop ax
ret
; Get address for a interrupt vector
; in AL interrupt number
; out DS:SI far ptr to routine/data
intr_load:
push ax
; SI = AL * 4
mov ah, 4
mul ah
mov si, ax
; ES = 0
xor ax, ax
mov ds, ax
; load offset
lodsw
mov si, ax
; load segment
lodsw
mov ds, ax
pop ax
ret