EasyManua.ls Logo

AMSTRAD CPC464 - Page 159

AMSTRAD CPC464
249 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
ON BREAK STOP
ON BREAK STOP
10 ON BREAK GOSUB 40
20 PRINT "program running"
30 GOT0 20
40 CLS
50 PRINT "pressing [ESC] twice calls GOSUB
routine"
60 FOR t=l TO 2000:NEXT
65 ON BREAK STOP
70 RETURN
COMMAND: When issued in an ON BREAK interrupt subroutine, ON BREAK STOP disables the
trap, but has no other immediate effect. In the above program, which includes ON BREAK STOP,
the ON BREAK GOSUB trap will only operate once.
Associated keywords: ON BREAK GOSUB
ON ERROR GOTO
ON ERROR GOTO <linenumber>
10 ON ERROR GOT0 ERROR GOT0 80
20 CLS
30 PRINT"if there is an error, I would"
40 PRINT"like the program listed, so that"
50 PRINT"I can see where I went wrong"
60 FOR t=l TO 4000:NEXT
70 GOTO 200
80 CLS:PRINT"THERE IS AN ERROR IN LINE";ERL:PRINT
90 LIST
COMMAND: Go to a specified line number in the program on detecting an error. In this example,
an error will be found in line 70.
Associated keywords: ERR, ERL, RESUME
ON SQ GOSUB
ON SQ (<channel>) GOSUB <line number>
ON SQ (2) GOSUB 2000
COMMAND: Enable an interrupt for when there is a free slot in the given sound queue. The
<channel> is an integer expression yielding one of the values:
1: for channel A
2: for channel B
4: for channel C
Associated keywords: SOUND, SQ

Table of Contents

Other manuals for AMSTRAD CPC464

Related product manuals