Appendix C
Sample Programs
© National Instruments Corporation
C-13
GPIB-1014P User Manual
|
| * * * * * * * * * * * * * * * * * * *
| * DATA SEND - DSEND*
| * * * * * * * * * * * * * * * * * * *
|
| Summary:
| -
Called by WRITE to transmit data messages if the
|
GPIB-1014P is Controller-In-Charge
| - Called directly from the main program if the
|
GPIB-1014P is not CIC
|
| Assumptions on entry:
| - The GPIB-1014P is Standby or Idle Controller
| - GPIB-1014P is or will be addressed to talk
| - If the GPIB-1014P is Idle Controller, the current CIC
|
will go to standby
| -
The d0 register contains the byte count
| -
The a0 register contains the address of the data
|
buffer
| - The user specified variable veoi has been set
|
properly
|
| Actions:
| -
Copy byte count to d1
| -
Wait until the CDOR is empty
| - Decrement d1
| - If last byte, assert EOI if in use
| - Write a byte
| - Check for a GPIB error
| -
Loop until all bytes are transferred
| - On an error, set d0 to -1
|
| Status on return:
| - The d0 register contains the number of bytes
|
transferred or a -1 to indicate an error