Wait; Wend; While - AMSTRAD cpc 6128 User Instruction

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

Advertisement

WAIT
W A I
T
<port number, , <mask,[, <inversion,]
WAIT &FF34,20,25
COMMAND: Waits until the specified 1/0 <port number, returns a 'particular value
in the range 0 to 255. BASIC loops whilst reading the
110
port. The value read is
eXclusive 0 Red with the <inversion, and then AN Ded with the <mask, until a
non-zero result occurs.
BASIC will wait indefinitely until the required condition occurs.
Not a command to be used by the unwary.
Associated keywords: I N P,
OU T
WEND
WEND
WEND
COMMAND: Marks the end of the body of program which is to be executed within the
W H I LE loop. WEN D automatically selects the W H I LE command it is to be associated
with.
Associated keywords: T I ME, W H I LE
WHILE
W H I LE <logical expression,
10 CLS:PRINT "Ten second timer":t=TIME
20 WHILE TIME<t+3000
30 SOUND 1,0,100,15
40 WEND:SOUND 129,40,30,15
run
COMMAND: Repeatedly executes a body of program while a given condition is true.
The W H I LE command defines the head ofthe loop, and specifies the condition in the
<logical expression,.
Associated keywords: T I ME, WEN D
Chapter 3 Page 88
Complete List of Keywords

Advertisement

Table of Contents
loading

Table of Contents