
7-6
Section
Details of BASIC Commands
166
intrr
Syntax:
INTRR
Description:
System Variable. Stores a number indicating the source of the interrupt.
INTRR
is a read-only system variable; it cannot be assigned a value.
The value of
INTRR
is set only in the interrupt routine, outside the interrupt routine
INTRR
is 0.
The following table shows the relationship between the value of and
INTRR
the interrupt source.
INTRR
Interrupt Source
1,2
COM
1,
COM
2
3,4
Not used
5
ALARM
6
TIMER
7
TIME
$
10-19
KEY
(0
TO
9)
20-100
Not used
101-199
ERROR
(1
TO
99)
200
Not used
201-299
PC
(1
TO
99)
Remarks:
Examples:
> 10 ON KEY 1 GOSUB 1000
> 15 KEY ON
> 20 GOTO 20
> 1000 PRINT “YOU PRESSED A KEY”
> 1010 PRINT “THE SOURCE OF THIS INTERRUPT IS TYPE “; INTRR
> 1020 RETURN
See also:
INTRB
,
INTRS
intrs
Syntax:
INTRS
Description:
System Variable. Stores the number of the program line that has set up the interrupt processing
routine.
Remarks:
INTRS
is a read-only system variable; it cannot be assigned a value.
On initialization of the BASIC program, the value of
INTRS
is set to 0. In the interrupt subroutine,
INTRS
contains the number of the program line that defined the interrupt that jumped to the
interrupt subroutine.
The value of
INTRS
is set when program execution jumps to the interrupt subroutine and reverts to
its original value when program execution is returned by the
RETURN
statement.
Examples:
> 10 ON KEY 1 GOSUB 1000
> 20 KEY ON
> 30 GOTO 30
> 1000 PRINT “YOU PRESSED A KEY”
> 1010 PRINT “THIS ISR WAS SET-UP IN LINE “; INTRS; “ OF THE BASIC
PROGRAM”
> 1020 RETURN
See also:
INTRB
,
INTRR
Содержание C200H-ASC11
Страница 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Страница 2: ...iv...
Страница 4: ...vi...