Appendix D Register-Level Programming
PC-DIO-96/PnP User Manual
D-30
©
National Instruments Corporation
_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
mov
ax,[bp+8]
; Get ofs into ax
mov
word ptr isrb_addr[0],ax
; Save address in variable
mov
ax,[bp+10]
; Get seg into ax
mov
word ptr isrb_addr[2],ax
; Save address in variable
; set interrupt vector--save the current vector before writing out new one
mov
ax,[bp+6]
; Get interrupt level
cmp
al,7
; Check to see if it belongs to master
ja
short slave
; or slave interrupt chip
add
al,008h
; Offset for master vector list
jmp
short setvec
; Go set the vector
Содержание PC-DIO-96/PnP
Страница 46: ......
Страница 47: ......
Страница 48: ......
Страница 49: ......
Страница 50: ......
Страница 51: ......
Страница 52: ......
Страница 53: ......
Страница 54: ......
Страница 55: ......
Страница 56: ......
Страница 57: ......
Страница 58: ......
Страница 59: ......
Страница 60: ......
Страница 61: ......
Страница 63: ......
Страница 64: ......
Страница 65: ......
Страница 66: ......
Страница 67: ......
Страница 68: ......
Страница 69: ......
Страница 70: ......
Страница 71: ......
Страница 72: ......
Страница 73: ......