Sample Programs Appendix C
GPIB-1014 User Manual C-20 © National Instruments Corporation
|
| * * * * * * * * * * * * * * *
| * COMMAND - CMD *
| * * * * * * * * * * * * * * *
|
| Summary:
| - Send GPIB interface or command messages
|
| Assumptions on entry:
| - The GPIB-1014 is Controller-In-Charge
| - The commands to be sent are in cmdbuf
| - The variable cmdct contains the number of
| commands to be sent, which must be less than 256
| - Interruption of any data transfer in progress is
| acceptable
|
| Actions:
| - Issue TCA command to assert ATN in case the
| GPIB-1014 is at standby
| - Load the d0 register with the address of cmdbuf
| - Load a0 with the number of commands
| - Call CSEND to transmit the bytes
|
| Status on return:
| - GPIB-1014 is Active Controller
| - GPIB devices are programmed as implied by
| command bytes
|
|
68000 Code | Comments
--------------------------------------------------------------------------------------------------------------------------------------------
|
CMD: movb #TCA,AUXMR | Take control in case at standby
|
movl #cmdbuf,a0 | Set up registers for CSEND call
movw #cmdct,d0 |
|
bsr CSEND | Call CSEND to send commands
|
rts |