Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual
Page 125

8M. Data Transfers
II. SOFTWARE GUIDES - 8. Driver488/DRV
II-110
Personal488 User’s Manual, Rev. 3.0
transfer, and when the
EOL
input terminator is set to
NONE
, Driver488/DRV does not append any
characters to the returned data.
Driver488/DRV senses the
EOL
output terminator to detect the end of a command or, in the case of the
OUTPUT
data command, to detect the end of the data. Most commands have many different variations.
It is the
EOL
output terminator that lets Driver488/DRV know when the command has been completely
received and is ready for execution. Without the
EOL
output terminator, there would be no way of
determining when one command ends and the next begins.
Driver488/DRV provides the
EOL
input terminator to the user’s program so that the program is able to
detect the end of a response. For example, BASIC needs to receive a carriage-return and line-feed
combination when using the
INPUT
statement to receive a response from Driver488/DRV.
Driver488/DRV automatically provides this EOL input terminator to the program.
For most programming languages, in most situations, both input and output
EOL
terminators should be
carriage-return line-feed (
CR LF
). These are the default values set up by
INSTALL
, but they can be
changed by using the
INSTALL
program. The
EOL
output terminator should be set to whatever is
conventionally sent at the end of a
or equivalent statement to Driver488/DRV, and the
EOL
input terminator should be set to whatever is required at the end of a line of input from
Driver488/DRV.
As mentioned previously, the
EOL
output terminator is used to delimit the data portion of an
OUTPUT
command. If, in the
OUTPUT
command, no character count is specified, the
EOL
output terminator does
delimit data. However, if a character count is specified, Driver488/DRV will accept exactly that
number of characters from the program for output to the bus, even if the
EOL
output terminator is
among those characters. Furthermore, if a character count is not specified, the
TERM
output terminator
will be sent to the bus devices after the data. If a character count is specified, nothing will be sent to
the bus except the exact characters that were sent from the program. For example:
PRINT#1,"OUTPUT10;ABC"
sends
ABC
to device
10
, while
PRINT#1,"OUTPUT10#5;DEF"
sends
DEF
to device
10
because BASIC will send a carriage return and line feed
(
) at the end of the command, and a character count of
5
was specified.
The
EOL
input terminator delimits character strings returned to the program by Driver488/DRV.
However, if the character count is specified in an
ENTER
command, then exactly that number of
characters, without the
EOL
input terminator appended, will be returned to the program. In this case,
the normal
INPUT
statement will not be able to read the data from Driver488/DRV. Instead, a function
like
INPUT$(count,file)
that reads a specific number of characters, must be used. For example,
the following statements :
PRINT#1,"ENTER 16"
INPUT#2,A$
read a line of data from device
16
, while the following :
PRINT#1,"ENTER 16#10"
A$=INPUT$(10,2)
statements read exactly
10
characters from device
16
. Finally, the
EOL
terminators are not used in
BUFFERED
transfers, either
ENTER
or
OUTPUT
.
EOL IN NONE
As mentioned above, the input or output
EOL
terminators may be set to
NONE
. To understand how
communication with Driver488/DRV is possible without terminators, it is necessary to understand in
more detail how programs communicate with Driver488/DRV.
When a program sends information to Driver488/DRV, it uses an MS-DOS
Write Data
command. It
tells DOS where to send the data (to Driver488/DRV), the number of characters to send (from
1
to