
7-6
Section
Details of BASIC Commands
197
8
bit 8
9
bit 9
10
bit 10
11
bit 11
12
bit 12
13
bit 13
14
bit 14
15
bit 15
Treats the m words as ASCII data and stores the specified
character(s) in the string variable.
m : the number of words
n : the specified byte(s)
n
Byte(s) read
1
byte 1 (bits 0-7)
2
byte 2 (bits 8-15)
3
bytes 1-2 (bits 0-15)
A Format
m A n
S Format
S m X n
Treats the m words as the kind of data indicated by X (I, H, O, or
B) and stores each word’s data in the n
th
array variable.
m : the number of words
X : Data type (I, H, O or B as described above)
n : the number of elements (as described above)
With the A format, many words of data from the PC can be stored in a single ASCII Unit variable,
although a maximum of 127 words can be transferred at one time.
Except for the A and S formats, and where a character variable is used as the variable, there must
be a one-to-one correspondence between each word and variable. With the A format, one format
must be used with each variable. With the S format, one format must be used with the variables in
each array.
Except for the A and S formats, and where a character variable is used as the variable, more than
one variable can be associated with a single format.
If the “m” setting is omitted, the default setting is 1 word. The setting range for “m” is 1 to 255.
For numerals it is 1 to 255, for characters it is 1 to 64.
String variables can be used to specify the format, but be sure to use uppercase characters when
specifying the format.
<variable> is any valid variable name. It must be of the same type as specified in the format string
and have as many elements as the number of words specified in the
PC READ
statement.
As an option, the
PC READ
statement can return a <result>. This <result> indicates whether the
PC
READ
statement was successful or not. If the <result> is 0 then the command was successfully
carried out and the data is written successfully. If the <result> is -1 then the
PC READ
could not be
carried out, perhaps because another data transfer was being performed.
When the ASCII Unit receives a
PC READ
request from the CPU Unit (through bit 1 of IR n), the
data from the data area location specified in IR n+3 and IR n+4 is read and stored in the specified
variables with the indicated pc format. The data is transferred at the next I/O refreshing cycle, and
the ASCII Unit will pause execution of the BASIC program until the data transfer has been
completed.
Refer to 6.3 Details of the Data Exchange Methods for more details on how to use the
PC READ
statement.
Содержание C200H-ASC11
Страница 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Страница 2: ...iv...
Страница 4: ...vi...