Routine for loading far ptr from IVT
This commit is contained in:
parent
809a959608
commit
de90b9cfd1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user