2-11
2
520
REM Help Menu
530
540
PRINT “HELP
for this menu”
550
PRINT “SPOL!
to Serial Poll Device address”
560
PRINT “DATA!
select DATA address”
570
PRINT “CMD!
select CMD address”
580
PRINT “ENTER
to read data from Device address”
590
600
A$=”XXX”
610
RETURN
620
REM Serial Poll
630
640
PRINT “********** SRQ INTERRUPT OCCURRED! **********”
650
PRINT “Serial Polling now...”
660
Stat=SPOLL(Adr)
670
PRINT “SRQ SPOLL RESULTS: Adr “;Devadr;”Status “;Stat
680
PRINT “*********************************************************”
690
A$=”XXX”
700
ENABLE INTR 7
710
RETURN
720
REM DATA mode
730
PRINT “DATA Address selected!”
740
Adr=701
750
A$=”XXX”
760
RETURN
770
REM CMD Mode
780
PRINT “CMD Address selected!”
785
Adr=700
790
SEND 7;UNL LISTEN Devadr
800
A$=”XXX”
810
RETURN
820
REM GPIB Timeout routine
830
PRINT “GPIB Timeout Occurred!”
840
RETURN
850
END
Figure 2-2 HP BASIC Command Entry/Readout Program
(Cont'd.)