Compucolor.org – Virtual Media

Listing of file='10P2.BAS;01' on disk='vmedia/color_graphics_1_suits-sector.ccvf'

0 GOTO 65000
1 CLEAR 300
2 X= 16:Y= 8:W= 32:H= 1:C= 1
3 D= 3:GOSUB 64000
4
5 REM  PROGRAM 10.2
6 REM  BACKWARDS TEXT GUESSING GAME
10 PLOT 15,6,6,12:REM  SET UP
18
19 REM  DRAW A BORDER AROUND THE MESSAGE DISPKAY AREA
20 PLOT 2,31,97,242,31,90,97,90,97,97,31,97,255
28
29 REM  GET THE MESSAGE
30 PLOT 8,6,2:INPUT "MESSAGE: ";M$:IF M$= "END"THEN 62000:REM  END
37
38 REM  ADD 32 SPACES TO THE MESSAGE SO THAT IT
39 REM  WILL SCROLL OFF ENTIRELY
40 FOR J= 1TO 32
50   M$= M$+ " "
60 NEXT
67
68 REM  HOME CURSOR AND ERASE 2 LINES, JUST IN CASE THE
69 REM  PREVIOUS MESSAGE WAS MORE THAN 1 LINE LONG
70 PLOT 8,11,10,11
78
79 REM  NOW GET THE SPEED
80 PLOT 8:INPUT "SPEED (1=FAST, 100=SLOW)? ";SP$
90 SP= VAL (SP$):IF LEFT$ (SP$,1)= "E"THEN 62000:REM  END
98
99 REM  CHECK FOR ERRORS
100 IF SP< 1OR SP> 100THEN PLOT 28,11:GOTO 80
108
109 REM  NOW PRINT THE MESSAGE IN RED FOR GOOD CONTRAST
110 PLOT 6,1
119
120 FOR J= 1TO LEN (M$)
130   ZZ= CALL (0)
140   PLOT 3,X,Y
150   PRINT MID$ (M$,J,1)
158
159   REM  DELAY
160   FOR K= 1TO SP:NEXT
170 NEXT
179
180 PLOT 6,2,3,0,1
190 INPUT "SAME MESSAGE OR A NEW ONE (S/N)? ";A$
200 IF LEFT$ (A$,1)= "S"THEN 70
210 IF LEFT$ (A$,1)= "E"THEN 62000:REM  END
220 IF LEFT$ (A$,1)< > "N"THEN PLOT 28,11:GOTO 190
230 PLOT 8,11,10,11:GOTO 30
61997
61998 REM  BEFORE ENDING THE PROGRAM, PUT THE TOP
61999 REM  OF MEMORY BACK WHERE IT WAS.
62000 GOSUB 65410
62010 AD= ER:Z= TM+ 34:GOSUB 65400
62019
62020 END
62021
63999 REM  QUAD DIRECTIONAL SCROLLING PATCH
64000 GOSUB 65410
64010 Z= 28672+ X+ X:IF D< > 2THEN Z= Z+ 128* Y:IF D= 3THEN Z= Z+ W+ W- (2- C)
64015 IF D= 2THEN Z= Z+ 128* (Y+ H- 1)
64020 AD= TM+ 2:GOSUB 65400
64030 POKE TM+ 5,H+ (D< 3):POKE TM+ 7,W* (C+ 1)+ (D> 2)* (1+ C)
64040 POKE TM+ 9,128+ 126* (D= 4)- 126* (D= 3):POKE TM+ 10,- 255* (D= 2OR D= 3)
64050 POKE TM+ 14,128+ 126* (D= 3)- 126* (D= 4):POKE TM+ 15,- 255* (D= 1OR D= 4)
64060 POKE TM+ 19,- (2- C)* (D< > 3)- (254+ C)* (D= 3):POKE TM+ 20,- 255* (D= 3)
64070 IF D= 1OR D= 4THEN Z= 130+ (2* (D= 1))- W- W:GOTO 64080
64075 Z= 128+ 2* (D= 3)+ W+ W:IF D= 2THEN Z= 256- Z
64080 POKE TM+ 27,Z:POKE TM+ 28,- 255* (D= 2)
64085 RETURN
64999
65000 GOSUB 65410:RESTORE 65010
65010 DATA 33,-1,-1,6,-1,14,-1,17,-1,-1,25
65020 DATA 126,17,-1,-1,25,119,17,-1,-1,25,13
65030 DATA 194,-1,-1,17,-1,-1,25,5,194,-1,-1,201
65040 IF TM> 65501THEN TM= TM- 34:GOTO 65080
65050 FOR J= 1TO 34:READ A
65060 IF A= > 0AND A< > PEEK (TM+ J)THEN J= 34:TM= TM- 34
65070 NEXT
65080 RESTORE 65010
65090 FOR J= 1TO 34:READ A:POKE TM+ J,A- (A< 0):NEXT
65100 Z= TM+ 1:AD= 33283:GOSUB 65400
65110 Z= TM:AD= ER:GOSUB 65400
65120 Z= TM+ 6:AD= TM+ 32:GOSUB 65400
65130 Z= TM+ 8:AD= TM+ 24:GOSUB 65400
65140 CLEAR 100:GOTO 1
65399
65400 ZZ= INT (Z/ 256):POKE AD,Z- 256* ZZ:POKE AD+ 1,ZZ:RETURN
65410 ER= 32940:TM= 256* PEEK (ER+ 1)+ PEEK (ER):RETURN