National Instruments PC-DIO-96 Switch User Manual


 
Register-Level Programming Chapter 4
PC-DIO-96 User Manual 4-24 © National Instruments Corporation
; on input, isr_block points to the data structure that will be used by
; the isr_handler function
;
; void isr_handler(void);
;
; the isr_handler() function will never be called from C.....
;
; void remove_isr(void);
;
public _install_isr, _isr_handler, _remove_isr
_DATA segment word public 'DATA'
; declarations
ackm equ 00020h
acks equ 000a0h
eoi equ 00020h
maskm equ 00021h
masks equ 000a1h
int_addr dd 0
int_mask dw 0
isrb_addr dd 0
slave_ack db 0
vect_num db 0
_DATA ends
_TEXT segment word public 'CODE'
assume cs:_TEXT, ss:_TEXT, ds:_DATA
; install_isr
;
; bp reg at [bp+0]
; ret addr ofs at [bp+2]
; ret addr seg at [bp+4]
; level at [bp+6]
; isr_block ofs at [bp+8]
; isr_block seg at [bp+10]
;
_install_isr proc far
cli
push bp
mov bp,sp
push ax
push bx
push cx
push dx
push ds
push es
mov ax,seg _DATA
mov ds,ax
; save the pointer for the isr_block structure--used in isr_handler