National Instruments PC-DIO-96 User Manual page 65

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

Advertisement

Chapter 4
mov
in
jmp
or
out
jmp
in
jmp
or
out
jmp
mov
mov
lds
int
; restore saved registers
ri_exit:
pop
pop
pop
pop
pop
pop
sti
ret
_remove_isr endp
; isr_handler
;
_isr_handler
cli
push
push
; service interrupt
; Your code here...
;
if this was not your interrupt, jump to 'ih_0'
;
if this was your interrupt, service it as appropriate;
;
;
;
;
;
;
;
;
;
;
© National Instruments Corporation
cx,int_mask
al,maskm
$+2
al,cl
maskm,al
$+2
al,masks
$+2
al,ch
masks,al
$+2
al,vect_num
ah,25h
dx,int_addr
21h
es
ds
dx
cx
bx
ax
proc
far
ax
ds
the pointer for the data structure 'isr_block' is stored
at _DATA:isrb_addr; to access the structure, use the
following steps:
mov
ax,seg _DATA
mov
ds,ax
lds
si,isrb_addr
you need not use ds:si, but be sure to save any
registers you use...
; Get the old mask value
; Get current master mask
; Delay--wait for data transfer
; OR in old mask value
; Send out new setting
; Delay--wait for data transfer
; Get current slave mask
; Delay--wait for data transfer
; OR in old mask value
; Send out new setting
; Delay--wait for data transfer
; al holds interrupt level
; ds:dx points to new handler
; Install the old vector
4-27
Register-Level Programming
PC-DIO-96 User Manual

Advertisement

Table of Contents
loading

Table of Contents