Sample Programs
Appendix C
GPIB-1014 User Manual
C-18
© National Instruments Corporation
|
68000 Code
| Comments
--------------------------------------------------------------------------------------------------------------------------------------------
|
WRITE:
movw #4,cmdct
| Put Untalk, Unlisten, MTA, and OLA
movb #UNT,cmdbuf
| commands in the buffer
movb #UNL,1
|
movb #MA+100,2
|
movb #ola,3
|
|
bsr
CMD
| Call CMD to address GPIB devices
|
movb #GTS,AUXMR
| Go to standby and drop ATN
|
movw #datct,d0
| Preset d0 register with byte count
movl #datbuf,a0
| Preset a0 register with address of buffer
|
bsr
DSEND
| Call DSEND to send data
|
WRITE1:
btst
#DO,ISR1
| Wait until last byte has been sent
beq WRITE1
|
|
movb #TCA,AUXMR
| Then take control
|
subw #2,cmdct
| Use CMD to unaddress GPIB devices
bsr CMD
|
|
rts
|
|