EasyManua.ls Logo

AMSTRAD CPC464 - Page 174

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...
SQ
SQ(<channel>)
10 MODE 1
20 FOR n=20 TO 0 STEP-l
30 PRINT n;
40 SOUND 1,10+n,l00,7
50 WHILE SQ(1)>127:WEND
60 NEXT
FUNCTION: The S Q function is used to check the number of free entries in the queue for a given
channel, where channel A is 1, B is 2, and C is 3. The function determines whether the channel is
active - and if not - why the entry at the head of the queue (if any) is waiting. The result is bit
significant:
0,1,2 indicate the number of free entries in the queue
3,4,5 indicate the Rendezvous state at the head of the queue (if any)
6 is set if the head of the queue is held
7 is set if the channel is currently active
Associated keywords: SOUND, ON SQ GOSUB
SQR
SQR(<numeric expression>)
PRINT SQR(9)
3
FUNCTION: Returns the square root of <numeric expression>.
Associated keywords: PRINT
STOP
STOP
300 IF n<0 THEN STOP
COMMAND: To stop execution of a program, but leave BASIC in a state where the program can be
restarted after the STOP command by using the CONT command. This may be used to interrupt the
program at a particular point when debugging.
Associated keywords: CONT, END

Table of Contents

Other manuals for AMSTRAD CPC464

Related product manuals