Commands and Statements

BASIC-80

TRON

TROFF

10 INPUT A,B,C

20PRINT(A+B+C)/3

30END

TRON OK RUN [10]42, 48, 45 [20]45 [30]

OK TROFF OK RUN 30, 18,12 20

Ok

WAIT

The WAIT statement instructs BASIC-80 to monitor incoming bytes from a specified port. These bytes are tested with a mask byte, which is an integer expres- sion in the range 0 to 255. The resulting bits are compared with the corresponding bits of the comparison byte, also an integer expression in the range or 0 to 255. If the

Icomparison byte is not specified, the default value is O. Execution of program text is halted until the two sets of bits differ. When the WAIT command is given, the port status is exclusive ORed with the comparison byte and the result is ANDed with the mask byte. Execution halts until a non-zero value is obtained.

WAIT port number, mask byte,[comparison byte]

WIDTH

The WIDTH command adjusts the width of the lines printed at the console to the specified value, which is an expression in the range 15 to 255. The default value for WIDTH is 72.

WIDTH expression

10 A$ = "ACTION, OHIO; WEAVERTON, VERMONT; HOLLOWAY, CALIFORNIA"

20PRINT A$

30WIDTH 15

40PRINT A$

50WIDTH 72

60END

RUN

ACTION, OHIO; WEAVERTON, VERMONT; HOLLOWAY, CALIFORNIA ACTION, OHIO; WE

AVERTON, VERMON T; HOLLOWAY,CA LlFORNIA

Ok

6-24

Page 64
Image 64
Intel 9800758-02 manual Wait, Width