Routine for loading far ptr from IVT
This commit is contained in:
parent
809a959608
commit
de90b9cfd1
1 changed files with 26 additions and 0 deletions
|
@ -32,3 +32,29 @@ intr_register:
|
||||||
pop es
|
pop es
|
||||||
pop ax
|
pop ax
|
||||||
ret
|
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…
Add table
Add a link
Reference in a new issue