Commodore PET User Manual page 389

Table of Contents

Advertisement

Program 7. INDIAN BLANKET.
5 REM PROGRAM 7 INDIAN BLANKET
10 REM
~
••
**.*
B LAN K E T
***.*.*
20
REM CONTINUOUS-LINE DISPLAY OF
30 REM
CHARACTERS ENTERED FROM THE
40 REM
KEYBOARD
50 REM
*••**.**************.**••••••••
90 PRII"-H"HIT AtW KEYS".;
1üü GET C$: IF C$="" GOTO 1ü0
110 PR 1NT
";:'1" .:
:
REM CLEAR SCREEN
120 FOR 1=1 TO 920
'REM 920/4ü=23 LINES
130 PRINT C$.;
134 FOR 3=1 TO 40:NEXT
J
'REM DELAY
1
::::5
GET D$: 1F D$<:>"" THEN C$=D$
137 IF D$=CHR$(13) GOTO 170
140 NEXT
150 PRINT"PHEW!"
155 PRINT"HIT ANY I<E'T'S OR <R> TO END";
160 GOTO 100
17(1
Et·m
Changes
Add:
Change:
Delete:
Lines 5. 134. 135. 137. 155
Lines 20. 30. 90. 160
Line 105
Comments
Line 135 allows different characters to be keyed in during the display. If a
key has been struck. it is fetched as D$. and C$ is assigned the new character.
Line 137 is added to handle the case where the RETURN key is struck during a dis-
play sequence. The messages were modified by changing lines 90 and 160 and
adding line 155 just as described for Program 2. The program is slowed down by a
delay loop at line 134 exactly the same as in Program 5 (Iine 135) except that the
delay time is lengthened by having an end value of 40 (instead of 10 as in Program
5).
376

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cbm

Table of Contents