Program 10, ALL THE
WAY.
5
REM
PROGRAM
10
ALL
THE
WAY
10
REM
*******
B
LAN
K E T
*******
20
REM
CONTINUOUS-LINE
DISPLAY
OF
ONE
30
REM
CHARACTER
ENTERED
FROM
THE
40
REM
KEY
BOARD
50
REM
***********.*****.*******.*****
913
PRINT"HIT A
KEY
OR
<R:>
TO
END";
100
GET
C$:IF
(:$=""
GOTO
100
105
IF
C$=CHR$(13)
GOTO
1713
lia
PR
1
~..jT":']"
;
.:
REM
CLEAR
SCREEN
120
FOR
1=1
TO
999
:REM
999/40=25
LINES
1313
PRINT C$;
1413
NE:'~T
150
POKE
33767,(ASC(C$)AND128)/2
OR
(ASC«(:$)AND63)
160
GOTO
100
170
END
Changes
Add:
Change:
Delete:
Comments
Line 5
Lines 120, 150, 160
None
Following the
hint
given
with
the problem in Chapter
3,
we can get the
character to print in 999 positions simply by changing the value
of
the
FOR
...
NEXT ending index in line 120 from the value 920 to the value 999. However. the
program cannot
PRINT
into the 1000th screen position
without
scrolling the dis-
play up one line. Recall
that
the previous program.
PRINTOVER
Il.
had to stop short
of
printing in the final position to avoid scrolling - but
that
program just wanted
to blank the position. and
it
was found
that
the position
would
always be blank
anyway.* The current program needs to display a character at
that
position. The
only way to accomplish this
with
the
PET
is
to
POKE
the character's screen value
into address 33767.
which
corresponds to the last screen position.
POKE
does
not
use the cursor and th
us
does not produce scrolling.
'The
final position
will
be
blank unless vou
POKEd
a character there before running the program. If
vou wanted
to
be
absolutelv sure about blanking this last position, vou could do
so
bV
POKEing
a
blank to
it
with
a
POKE
33767.32
381