
64
Interrupt Functions
Section 5-5
5-5
Interrupt Functions
Interrupt
Details
Program
Enable/disable/
stop commands
(See note 2.)
Communi-
cations
interrupts
The interrupt subroutine is executed when data is
received in the receive buffer. All data received is
stored in the receive buffer
ON COM n GOSUB
n: 1 or 2
COM n
(ON/OFF/STOP)
n: 1 or 2
The interrupt subroutine is executed when a speci-
fied character is received in the receive buffer. (Data
beyond the specified character is also received in the
buffer.) (See note 1.)
ON COM n
GOSUB, CODE = XX
n: 1 or 2
The interrupt subroutine is executed when a speci-
fied number of bytes is received in the receive buffer.
(Data beyond the specified number of bytes is also
received in the buffer.) (See note 1.)
ON COM n
GOSUB, BYTE = XX
n: 1 or 2
The interrupt subroutine is executed when a speci-
fied final character is received in the receive buffer
after a specified start character. (The string of char-
acters between the start character and final charac-
ter remains in the buffer. Data after the specified final
character is also received in the buffer.) (See note 1.)
ON COM n
GOSUB, HEAD = XX, TERM = YY
n: 1 or 2
The interrupt subroutine is executed when a speci-
fied number of characters is received in the receive
buffer after a specified start character. (The character
string from the specified start character to the speci-
fied number of characters remains in the receive
buffer, and the data after the specified number of
characters is also received in the receive buffer.)
(See note 1.)
ON COM n
GOSUB, HEAD = XX, BYTE = YY
n: 1 or 2
Key
interrupts
The interrupt subroutine is executed when a certain
key signal is input. (See note 3.)
ON KEY(n) GOSUB
n: 0 to 9
KEY n
(ON/OFF/STOP)
n: 0 to 9
PC
interrupts
Specified PC interrupt number interrupt subroutines
are executed by interrupts from the IOWR(#CC00)
instruction or IR/CIO words allocated to the ASCII
Unit in the PC. (See note 4.)
I/O Allocations: PC interrupts are triggered by the IR/
CIO words allocated to the ASCII Unit: IR/CIO n bit
04.
PC interrupt number is set in IR/CIO n + 2 bits 00 to
07.
IOWR(#CC00): Triggers a PC interrupt by sending
data.
ON PC GOSUB
n: 01 to 99
PC n
(ON/OFF/STOP)
n: 01 to 99
Timer
interrupts
The interrupt subroutine is executed repeatedly each
time the timer times out (interval time). (Once exe-
cuted, the subroutine is repeated until TIME OFF is
specified.)
ON TIMER 300 GOSUB
A subroutine branch to the GOSUB
line number will occur 30 seconds
after this command is executed; the
subroutine branch is then repeated
each 30 seconds. Timer: 0 to
864000 (0.1-s unit)
TIMER
(ON/OFF/STOP)
On alarm
interrupts
The subroutine interrupt is executed when the timer
times out (one-shot timer). (No repetition after the ini-
tial execution.)
ON ALARM 300 GOSUB
A subroutine branch to the GOSUB
line number will occur once only, 30
seconds after this command is
executed.
Timer: 0 to 864000 (0.1-s unit)
ALARM
(ON/OFF/STOP)
Scheduled
interrupts
The interrupt subroutine is executed at a specified
time.
ON TIME$ = “
@
:
@
:
@
” GOSUB
TIME$
(ON/OFF/STOP)
Error
interrupts
The interrupt subroutine is executed when an error
occurs.
ON ERROR GOTO
Содержание C200H-ASC11
Страница 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Страница 2: ...iv...
Страница 4: ...vi...