45
The ON PC GOSUB statement is enabled with the PC ON statement and dis-
abled with the PC OFF statement.
Program Example:
10
ON PC 1 GOSUB 100
20
ON PC 2 GOSUB 200
30
PC ON
40
GOTO 40
100
PC READ “H4,I2”;I, J
110
PRINT I, J
120
RETURN
200
INPUT A
210
PC READ “H4,I2”;K,L
220
PC WRITE “14”; A
230
RETURN
Program Remarks:
When interrupt 1 is invoked, program execution branches to statement 100,
reads two words of data from the PC, and displays them on the CRT.
When interrupt 2 is invoked, program execution branches to statement 200 and
writes data entered through the keyboard to the PC.
PC GET Statement
Purpose:
To read output data from the PC
Format:
PC GET <var 1>[,<var 2>]
Example:
PC GET I,J
Remarks:
In two-word mode, bits 0 to 7 of word (n) are read and assigned to <var 1>. Bits 8
to 15 of data word (n) are read and assigned to <var 2>. In four-word mode, the
same bits are assigned from word (n+1).
The ASCII Unit converts the hexadecimal data into decimal data (0 to 255) be-
fore assigning it to the specified variables.
PC ... ON/STOP Statements
Purpose:
To enable or stop a PC interrupt defined with an ON PC GOSUB
statement
Format:
PC [<num>] ON/STOP
<num> is a specific interrupt number.
Remarks:
The PC ON statement enables an interrupt defined by the ON PC GOSUB state-
ment.
After this statement has been executed, each PC interrupt will cause program
execution to branch to a routine defined by the associated ON PC GOSUB state-
ment.
The PC STOP statement disables PC interrupts from branching program execu-
tion. However, if the PC ON statement is subsequently executed, execution will
branch to the specified interrupt service routine based on the “STOPPED” inter-
rupt.
The PC ON/STOP statements can be executed only after the ON PC GOSUB
statement has been executed.
If there is more than one interrupt routine in the program the specific interrupt
number should be specified. If there are two or more routines and the interrupt
Commands, Statements, and Functions
Содержание C500-ASC04
Страница 1: ...C500 ASC04 ASCII Unit Operation Manual Revised February 2001 ...
Страница 5: ...iv ...
Страница 7: ...vi ...