49
CHAPTER 5: Command Descriptions
RESPONSE
Device-dependent data. If
count
is specified, then
count
characters will be
returned, followed by the serial output terminators. Otherwise, the response ends
when the IEEE bus input terminator is detected and the serial output terminators
are appended to the returned data.
MODE
CA
BUS STATES
ATNUNL,MLA,TAG,*ATN, data, ATN
(With
addr
)
*ATN, data, ATN
(Without
addr
)
EXAMPLES:
PRINT#1,"ENTER16"
Read data from device 16.
INPUT#1,A$
PRINT#1,"ENTER16"
Read an entire line of data from device 16 even if it contains commas
LINE INPUT#l,A$
or other punctuation.
PRINT#1,"ENTER16;CR"
Read data from device 16 until CR is encountered.
INPUT#1,A$
PRINT#1,"ENTER16 EOI"
Read data until EOI is detected.
INPUT#1,A$
PRINT#1,"ENTER 0702"
Read data from device 7, secondary address 2.
INPUT#1,A$
PRINT#1,"EN 12 #5"
Read 5 bytes from device 12.
A$=INPUT$(5,#1)
INPUT$ gets 5 bytes from file #1
PRINT#1,"ENTER #20"
Read 20 more bytes.
A$=INPUT$(20,#1)
PRINT#1,"ENTER ;20"
Read 20 more bytes.
A$=INPUT$(20,#l)
ENTER (Peripheral mode) Command
In Peripheral mode, the ENTER command receives data from the bus under Active Controller’s control.
The Active Controller must put the 488 Controller into the Listen state and configure some bus device to
provide the 488 Controller with data. The Listen state can be checked with the STATUS 1 command, can
cause a reported event message with the ARM command, or can force a macro execution with the ON
<event> DOMACRO command. A time-out error will occur (if enabled) if the 488 Controller does not
receive a data byte within the time-out period after issuing the ENTER command.
If the character count,
count
, is specified, then exactly that number of characters will be read from the
device with the serial output terminators appended. Otherwise, ENTER terminates reception on detection
of the line feed (LF) character, which may be overridden by specifying the terminator in the ENTER
command.
If a terminator,
term
, option is specified, all CR and LF characters in the input data are unconditionally
discarded. When the specified terminator is detected, it is discarded and replaced with the serial
terminator(s) before being returned to the serial host. The optional terminator applies ONLY to the
ENTER command it is sent with. The terminator returns to a Line Feed on subsequent ENTER commands.