
46
number is not specified, the routine closest to the end of the program or at the
highest line number will be executed regardless of which interrupt is invoked.
After the ON PC GOSUB statement is executed, PC ON becomes valid. Refer to
the following example.
Program Example:
10
ON PC GOSUB 100
20
PC ON
30
GOTO 30
100
PC READ “3I2”; A, B, C
110
PRINT A, B, C
120
RETURN
PC PUT Statement
Purpose:
To write data to the PC’s ASCII Unit Data Memory Area
Format:
PC PUT <num exp>
<num exp> is a valid numeric expression between 0 and 255.
Examples: PC PUT I
PC PUT 123
Remarks:
In two-word mode, data is written to bits 8 to 15 of word n+1. In four-word mode,
data is written to bits 8 to 15 of word n+3.
If the value of the numeric expression is not an integer, the INT function is inter-
nally executed to round it off. If the value of the numeric expression is negative or
greater than 255, zero is written to the PC.
PC READ Statement
Purpose:
To read data from the PC
Format:
PC READ “<format>[,<format>,<format>, ...]”;
<var1>[,<var2>,]...
<format> specifies how the data will be read. For specific format
information, refer to Appendix C.
Examples:
PC READ “2H1, A3, I4, O2”; X, Y, A$, I, J
Remarks:
When the PC has written the data to the ASCII Unit, the PC READ statement is
executed.
If the PC has not written the data to the ASCII Unit, the ASCII Unit will wait for the
data, and the PC READ statement is not executed until the data comes.
If the number of data items output by the PC is greater than that specified by the
format parameters, the excess part of the output data will be ignored.
The maximum number of data items that can be transferred with one READ
statement specification is 255 in the S or A formats.
If an amount of memory greater than the actual memory area is specified by the
READ statement, a FORMAT ERROR will occur.
The PC READ statement’s formatting parameters can be assigned to a single
character variable and that variable may then be used in the PC READ state-
ment.
Refer to Appendix C for details on READ and WRITE statement formatting.
Example:
A$ = “2H1, A3, I4, O2”
PC READ A$;X, Y, A$, I, J
Commands, Statements, and Functions
Содержание C500-ASC04
Страница 1: ...C500 ASC04 ASCII Unit Operation Manual Revised February 2001 ...
Страница 5: ...iv ...
Страница 7: ...vi ...