Sq; Sqr - AMSTRAD cpc 6128 User Instruction

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

SQ
S Q ( <channel»
10 SOUND 65,100,100
20 PRINT SQ(1)
run
67
FUNCTION: Reports the state of the Sound Queue for the specified <channel> which
must be an integer expression, yielding one ofthe values:
1 : for channel A
2 : for channel B
4 : for channel C
The S Q function returns a bit significant integer, comprising the following bit
settings:
.
BitsO,1,and2
Bits 3, 4, and 5
Bit6
Bit 7
: the number offree entries in the queue
: the rendezvous state at the head of this queue
: the head of the queue is held
: the channel is currently active
.... where BitO is the least significant bit, and Bit 7 is the most significant bit.
It can be seen therefore, that if Bit 6 is set, Bit 7 cannot be set, and vice versa.
Similarly if Bits 3, 4, or5 are set, Bits 6 and 7 cannot be set.
Further information concerning sound will be found in part 2 of the chapter entitled
'At your leisure .... '.
Associated keywords: 0 N S Q GO SUB, SOU N D
SQR
S Q R ( <numeric expression> )
PRINT SQR(9)
3
FUNCTION: Returns the S Quare Root of the specified <numeric expression>.
Associated keywords: none
Complete List of Keywords
Chapter 3 Page 77

Advertisement

Table of Contents
loading

Table of Contents

Save PDF