2 Introduction to Programming50 Keysight Models 6811C, 6812C, and 6813C Programming GuideTypes of DOS driversThe Keysight 82335A and National Instruments GPIB are two popular DOS drivers.Each is briefly described here. Refer to the software documentation supplied withthe driver for more details.Keysight 82335A driverFor GW-BASIC programming, the GPIB library is implemented as a series ofsubroutine calls. To access these subroutines, your application program mustinclude the header file SETUP.BAS, which is part of the DOS driver software.SETUP.BAS starts at program line 5 and can run up to line 999. Your applicationprograms must begin at line 1000. SETUP.BAS has built-in error checkingroutines that provide a method to check for GPIB errors during program execution.You can use the error-trapping code in these routines or write your own codeusing the same variables as used by SETUP.BAS.National Instruments GPIB driverYour program must include the National Instruments header file DECL.BAS. Thiscontains the initialization code for the interface. Prior to running any applicationsprograms, you must set up the interface with the configuration program(IBCONF.EXE).Your application program will not include the ac source symbolic name and GPIBaddress. These must be specified during configuration (when you runIBCONF.EXE). Note that the primary address range is from 0 to 30 but anysecondary address must be specified in the address range of 96 to 126. Theinstrument expects a message termination on EOI or line feed, so set end ofidentify (EOI) with last byte of Write. It is also recommended that you set DisableAuto Serial Polling.All function calls return the status word IBSTA%, which contains a bit (ERR) that isset if the call results in an error. When ERR is set, an appropriate code is placed invariable IBERR%. Be sure to check IBSTA% after every function call. If it is notequal to zero, branch to an error handler that reads IBERR% to extract the specificerror.