National Instruments Corporation GPIB-1014P User Manual page 126

Table of Contents

Advertisement

Sample Programs
68000
Code
------------------------------------------------------------------------------------------------------------------------------------------------
RCV:
link
a6,-4
movl
d1,a6@(-4)
movl
d2,a6@(-8)
movb
#FH,AUXMR.L
tst
b cic.L
beq
RCV1
movb
#AUXRA+0202,AUXMR.L | Yes--Set HLDE and BIN in AUXRA
bra
RCV2
RCV1: movb
#AUXRA,AUXMR.L
RCV2: clr
d1
RCV3: movb
ISR1.L,d2
btst # END+DI,d2
beq
RCV3
btst
#END,d2
bne
RCV5
movb DIR,a0@+
addw
#1,d1
cmpw d0,d1
bne
RCV3
bra
RCV6
RCV5: movb
DIR,a0@
movw d1,d0
RCV6: movb
#AUXRA+1,AUXMR.L
movl
a6@(-8),d2
movl
a6@(-4),d1
unlk
a6
rts
GPIB-1014P User Manual
|
|
Comments
|
|
| Save d1
| Save d2
| Release any handshake holdoff in progress
| Is GPIB-1014P Controller-In-Charge?
|
|
| No--Clear any HLDE or HLDA in effect
|
| Clear byte counter
|
| Read status
| Wait for GPIB END or DI
|
| Look for END
|
| Read byte
|
| More bytes to read?
| Yes--continue
| No--exit
| END--read last byte
| Record bytes read
| Send HLDA
| Restore d2
| Restore d1
| Unlink
| Return
C-10
Appendix C
© National Instruments Corporation

Advertisement

Table of Contents
loading

Table of Contents