288
S:\HP8924C\USRGUIDE\BOOK\CHAPTERS\ibasic.fb
Chapter 6, IBASIC Controller
PROGram Subsystem
NOTE: It is possible for the PROGram Subsystem to think that there is an IBASIC program resident
in the Test Set when, in actuality, there is not. This situation would exist for example, if an
IBASIC program had been created and downloaded using the :DEFine command and then
deleted, from the front panel, using the SCRATCH ALL command from the IBASIC
Command line. Under this circumstance IBASIC Error -282 would be generated when another
attempt is made to download a program with the PROGram Subsystem. It is recommended
that the :DELete:ALL command always be sent immediately before the :DEFine command.
The IBASIC program downloaded into the Test Set must be transferred as IEEE
488.2 Arbitrary Block Program Data. Refer to the IEEE Standard 488.2-1987 for
detailed information on this data type. Two syntax forms are provided with the
Arbitrary Block Program Data data type: one form if the length of the program is
known and another one if it is not.
Syntax (length of program not known)
PROGram[:SELected]:DEFine <#0><program><NL><END>
The following notation is used in the command description:
<#0> = IEEE 488.2 Arbitrary Block Program Data header.
<program> = the IBASIC program sent as 8 bit data bytes.
<NL> = new line = ASCII line-feed character.
<END> = IEEE 488.1 END message. This terminates the block transfer and is only sent
once with the last byte of the indefinite block data.
Example BASIC program to download an IBASIC program to Test Set
10 OUTPUT 714;"PROG:DEL:ALL"!Delete current program
20 OUTPUT 714;"PROG:DEF #0"!Create program, send header
30 OUTPUT 714;"10 FOR J = 1 TO 10"!1st prog line
40 OUTPUT 714;"20 DISP J"!2nd prog line
50 OUTPUT 714;"30 BEEP"!3rd prog line
60 OUTPUT 714;"40 NEXT J"!4th prog line
70 OUTPUT 714;"50 END"END!Send END message at end of last line
80 END