
7-6
Section
Details of BASIC Commands
141
alarm on/off/stop
Syntax:
ALARM
(
ON
|
OFF
|
STOP
)
Description:
Statement. Enables, disables or stops the time interrupt
ON
enables the interrupt. When this statement is executed the
ON ALARM
interrupt is unmasked.
If an
ALARM
interrupt occurs, program execution branches to the defined
GOSUB
routine for
interrupt processing.
OFF
disables the interrupt. All subsequent
ALARM
interrupts are ignored.
STOP
masks and enables the interrupt. If an interrupt is received, it is stored in memory but
program execution is not branched to the interrupt subroutine. Program execution will be
branched to the stored interrupt’s subroutine when the interrupt is unmasked with the ALARM
ON statement.
Remarks:
Note:
1.
Only one
ON ALARM
interrupt may be valid. If more than one is set in a program
then the last one executed is valid.
2.
After branching processing the
ALARM
interrupt, the interrupt is disabled and all
subsequent
ALARM
interrupts are ignored until it is re-enabled with the
ALARM ON
statement.
3.
The ALARM ON/OFF/STOP statements can be executed only after the ON
ALARM statement has been executed.
4.
Interrupts are disabled immediately after execution of ON ALARM GOSUB.
Examples:
> 10 ON ALARM 30 GOSUB 1000
> 20 ALARM ON
> 30 GOTO 30
> 1000 PRINT “ALARM INTERRUPT OCCURRED”
> 1010 RETURN
> RUN
ALARM INTERRUPT OCCURRED
See also:
ON ALARM
asc
Syntax:
ASC
(<string expression>)
Description:
Function. Returns the character code of the first character in the <string expression>.
The return value is an integer representing the ASCII character code of the first character in the
string expression.
Remarks:
Note:
1.
The return value will be in the range: [0…255]
Examples:
> 10 B$ = "B"
> 20 PRINT ASC(B$)
> RUN
66
See also:
CHR
$
Содержание C200H-ASC11
Страница 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Страница 2: ...iv...
Страница 4: ...vi...