Appendix C Sample Programs - National Instruments Corporation GPIB-1014P User Manual

Table of Contents

Advertisement

Appendix C
Sample Programs
This appendix contains listings of routines in 68000 assembly language code that implement the
essential elements of these major utility functions:
Initialize the GPIB-1014P interface (INIT).
Initialize the interface functions of the GPIB devices (IFC).
Set or clear the GPIB REN line (REN).
Accept data bytes from a Talker (RCV).
Address Talker and read device-dependent messages (READ).
Send data bytes to Listeners (DSEND).
Address Listener and write device-dependent messages (WRITE).
Send command bytes to Listeners (CSEND).
Write interface messages (CMD).
Pass GPIB control to another device (PASSC).
Assumptions regarding the state of the GPIB-1014P appear at the beginning of each routine and
must be adhered to for proper, error-free operation.
The following characteristics of the code must be considered:
The GPIB-1014P base address is FF1000 hex.
Normal (non-extended) GPIB addressing is used.
Time-out on subroutine calls is not implemented.
Register values are not saved on subroutine calls.
Program interrupt is not used; status checking is by register polling.
Constants and variables listed in the User-Specified Constants section of the listings must be
initialized to correct values.
In operands containing expressions, + is used in place of logical OR for convenience. An
arithmetic addition yields the same result for the instances here.
© National Instruments Corporation
C-1
GPIB-1014P User Manual

Advertisement

Table of Contents
loading

Table of Contents