National Instruments PC-DIO-96 User Manual page 64

Digital i/o board for the ibm pc/xt/at
Table of Contents

Advertisement

Register-Level Programming
; restore saved registers
ii_exit:
pop
pop
pop
pop
pop
pop
pop
sti
ret
_install_isr
; remove_isr
;
; bp reg
; ret addr ofs
; ret addr seg
;
_remove_isr proc
cli
push
push
push
push
push
push
mov
mov
; see if our vector is installed--if not, do not remove the vector
cmp
jz
mov
mov
int
mov
mov
cmp
jne
cmp
jne
; restore old mask and vector values
PC-DIO-96 User Manual
es
ds
dx
cx
bx
ax
bp
endp
at [bp+0]
at [bp+2]
at [bp+4]
far
ax
bx
cx
dx
ds
es
ax,seg _DATA
ds,ax
vect_num,0
short ri_exit
al,vect_num
ah,35h
21h
cx,cs
dx,es
dx,cx
short ri_exit
bx,offset _isr_handler
short ri_exit
; See if vect_num was ever set
; Our vector never installed--exit
; Get vector number
; Get current vector from DOS
; Get previous int_addr in es:bx
; Prep to compare old/current vectors
; See if our vector is already there
; Different vector segment--exit
; Different vector offset--exit
4-26
© National Instruments Corporation
Chapter 4

Advertisement

Table of Contents
loading

Table of Contents