Compucolor.org – Virtual Media

Listing of file='TOWERS.BAS;01' on disk='vmedia/isc_demos-sector.ccvf'

10 REM KY
20 OUT 8,207:POKE 33278,0:N2= 2:SL= 83:GOTO 65
30 PLOT 27,88,15,3,63,31,6,6,31,46,15,6,0,3,64,0:OUT 8,207
40 FOR I= 1TO 50:GOSUB 700
45 IF A= 32THEN OUT 8,199:CLEAR :S= 1:GOTO 20
46 IF A= 72OR A= 104THEN OUT 8,199:PLOT 6,2,12,15,29:PRINT "LOADING DEMO INSTRUCTIONS...":PLOT 3,64,0:LOAD "HELP":RUN
50 NEXT I:OUT 8,199
51 IF PEEK (33284)= 1THEN PLOT 27,88,6,0,15,3,63,31,32,3,64,0:LOAD "DISPLY":RUN
55 GOTO 100
65 IF S= 0AND PEEK (33284)= 1THEN N2= 7:SL= 0
70 DIM C$(10),C(10):BC= 81
80 DIM T(3,10),TP(3)
90 DIM N(20),X(20),Y(20),Z(20)
100 PLOT 30,16,29,18,12,27,88,15:N= N2:N1= N
110 MV= 0:PLOT 15
120 X= 1:Y= 2:Z= 3
130 GOSUB 500
140 IF MVTHEN NM= 0:GOTO 420
150 GOSUB 260
160 PLOT 6,6,3,19,7,14
170 PRINT "IT ONLY TOOK ME ";INT (2^ N1- .5)" MOVES!"
180 PLOT 3,64,0:N2= N2+ 1
184 IF A= 70AND N2> 10THEN N2= 2
185 IF A= 70AND N2< 10THEN 30
190 IF N2> 5THEN N2= 2:GOTO 30
200 GOTO 30
210 GOTO 100
220 GOTO 160
230 M1= INT (VAL (A$)):IF M1< 1OR M1> 3THEN 420
240 IF TP(M1)= 0THEN 420
250 GOSUB 320:NM= NM+ 1:GOTO 420
260 TS= TS+ 1:N(TS)= N:X(TS)= X:Y(TS)= Y:Z(TS)= Z
270 IF N(TS)= 0THEN 310
280 N= N(TS)- 1:X= X(TS):Y= Z(TS):Z= Y(TS):GOSUB 260
290 M1= X(TS):M2= Y(TS):GOSUB 320
300 N= N(TS)- 1:X= Z(TS):Y= Y(TS):Z= X(TS):GOSUB 260
310 TS= TS- 1
311 OUT 8,207:PLOT 27,88,6,6,29,31,3,63,31,46,15,6,0,29
312 GOSUB 700
314 IF A= 32THEN OUT 8,199:GOTO 180
316 IF A= 72OR A= 104THEN OUT 8,199:PLOT 6,2,12,29:PRINT "LOADING DEMO INSTRUCTIONS...":PLOT 3,64,0:LOAD "HELP":RUN
317 IF A= 83OR A= 115THEN SL= 83
318 IF A= 70OR A= 102THEN SL= 0:DISKS= 10
319 RETURN
320 IF SLTHEN 340
330 T= M1:M= T(T,TP(T)):GOSUB 610:T= M2:GOSUB 590:RETURN
340 T= M1:M= T(T,TP(T)):GOSUB 490:TP(T)= TP(T)- 1
350 P= B- 1:Q= 7:GOSUB 440
360 GOSUB 400
370 T= M2:TP(T)= TP(T)+ 1:T(T,TP(T))= M:GOSUB 490
380 P= 8:Q= B:GOSUB 440
390 RETURN
400 R= SGN (M2- M1):FOR I= 21* M1- 11+ RTO 21* M2- 11STEP R
410 PLOT 3,BC,I- R* (M+ 1),7,0,32,3,64,0
420 PLOT 3,BC,I+ R* M,7,C(M),32,3,64,0
430 NEXT :RETURN
440 R= SGN (Q- P):FOR I= PTO QSTEP R
450 PLOT 3,BC,A,I- R,0:PRINT SPC( D)"":PLOT 3,64,0
460 IF I- R> 8THEN PLOT 3,BC,C,I- R,56,32,3,64,0
470 PLOT 3,BC,A,I,C(M):PRINT SPC( D)"":PLOT 3,64,0
480 NEXT :RETURN
490 A= 21* T- M- 11:B= 30- 2* TP(T):C= A+ M:D= 2* M+ 1:RETURN
500 TS= 0:FOR I= 1TO 3:T(I,0)= N+ 1:TP(I)= 0:NEXT
510 PLOT 14,3,0,30,6,39:PRINT SPC( 63)""
520 FOR I= 1TO 3:PLOT 3,21* I- 11,30,48+ I:NEXT :PLOT 15
530 PLOT 6,56,27,10:FOR I= 1TO 3:PLOT 3,21* I- 11,9:PRINT SPC( 21)"":NEXT :PLOT 27,24
540 T= 1
550 RESTORE :FOR I= 1TO 10:READ C:C(I)= 8* C:C$(I)= CHR$ (6)+ CHR$ (8* C):NEXT
560 FOR M= NTO 1STEP - 1:GOSUB 590:NEXT
570 RETURN
580 DATA 6,5,3,2,1,6,5,3,2,1
590 TP(T)= TP(T)+ 1:T(T,TP(T))= M
600 PLOT 3,BC,21* T- M- 11,30- 2* TP(T),C(M):PRINT SPC( 2* M+ 1)"":PLOT 3,64,0:RETURN
610 PLOT 3,BC,21* (T- 1),30- 2* TP(T),0:PRINT SPC( 21)"":PLOT 3,64,0
620 PLOT 3,BC,21* T- 11,30- 2* TP(T),56,32,3,64,0
630 TP(T)= TP(T)- 1:RETURN
700 A= PEEK (33278):IF A= 13THEN OUT 8,199:PLOT 27,88,15,6,0,3,63,31,32,3,64,0:LOAD "MENU":RUN
710 RETURN