Appendix B Sample Programs - National Instruments GPIB-SBX User Manual

Table of Contents

Advertisement

Appendix B
Sample Programs
This appendix contains listings of routines in 8080 and 8088 assembly language code that implement
the essential elements of these major utility functions:
Initialize the GPIB-SBX 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).
8088 code appears on the left, 8080 code appears in the middle, and comments applying to both sets
of code are on the right. Assumptions regarding the state of the GPIB-SBX 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-SBX base address is 50 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.
© National Instruments Corporation
B-1
GPIB-SBX User Manual

Advertisement

Table of Contents
loading

Table of Contents