As before,
(]J
should move the asterisk left and
(]J
should move the asterisk right.
Hold down
m until the asterisk reaches the top line
of
the display.
If
you attempt to
move the asterisk higher, a "warning beeper" sounds and the asterisk stays on the top
line.
Similarly
if
you
try
to move beyond any display boundary, the beep will sound and
the asterisk will stop moving. Try this by moving the asterisk to the four comers with
the appropriate keys.
Line
238
If
m is pressed, the PRINT@ position
is
decreased by 40 to move up one
line.
Line
240
If
00 is pressed, the PRINT@ position is increased by 40 to move down
one line.
Line
258
If
the new PRINT@ position (AT) will be valid, that is, between 0 and 318,
the condition
AT>=0
AND
AT<=318
will be true, and execution jumps to Line 300. The condition uses the logical operator
"AND"
to combine the two logical expressions
AT>=0
AND
AT<=318
into a third logical expression. A logical expression is either true or false. For
example, the expression:
AT>=0
is True if AT
is
greater than or equal to zero. It will be False
if
AT
is
less than zero.
Similarly, the combined expression
AT>=0
AND
AT<=318
will be True
if
AT is greater than or equal to zero and also less than or equal to 318.
In general,
if
Ll
and L2 are two logical expressions, then the logical expression:
L1
AND L2
is
True if both
Ll
and L2 are True, and False otherwise. Logical expressions may also
be combined with the OR logical operator. The expression
L1
OR L2
is
True
if
either
Ll
or L2 is True, and False only
if
they are both False.
You may have wondered why the upper limit on the PRINT@ position was 318
instead of 319, which is the extreme lower right comer of the display. This was done
to
prevent scrolling which would occur
if
the asterisk was printed in the comer.
Even the use uf a semiculun after the PRINT@ will nut prevent the scrolling, which
occurs automatically when a character
is
printed in position 319. You can verify this
for yourself
by
changing Line 250
to:
250
IF
AT>=0
AND
AT<=318
GOTO
300
and moving the asterisk into the lower right comer.
121