Sample Programs
Appendix C
GPIB-1014P User Manual
C-16
© National Instruments Corporation
|
68000 Code
| Comments
------------------------------------------------------------------------------------------------------------------------------------------------
|
WRITE: movw #4,cmdct.L
| Put Untalk, Unlisten, MTA, and OLA
movb #UNT,cmdbuf.L
| commands in the buffer
movb #UNL,cmdbuf.L+1
|
movb #MA+100,cmdbuf.L+2 |
movb #ola,cmdbuf.L+3
|
bsr
CMD
| Call CMD to address GPIB devices
movb #GTS,AUXMR.L
| 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
| Source Handshake-Data will write data
WRITE1: btst
#DO,ISR1.L
| Wait until last byte has been sent
beq WRITE1
|
movb #TCA,AUXMR.L
| Then take control
subw #2,cmdct.L
| Prepare to unaddress all Talkers and Listeners
bsr CMD
|
rts
|