Compucolor.org – Virtual Media

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

10 REM
20 REM
30 REM
40 REM
50 CH= 96:FLG= 29
60 PLOT 6,7,12
100 DIM E(50),F(50)
105 RESTORE 500
110 FOR G= 1TO 36
120 READ A,B
130 E(G)= A:F(G)= B
140 NEXT
150 RESTORE 500
299 W= 0
300 P= 0:Z= 1:Y= 0
301 READ A
305 IF A= 0THEN 401
320 FOR X= PTO P+ 10
325 FOR L= YTO Y+ 1
330 PLOT 3,X,L,30,A,32
340 NEXT :NEXT
350 READ B
360 FOR X= PTO P+ 10
365 FOR L= YTO Y+ 1
370 PLOT 3,X,L,29,B,FLG,CH
380 NEXT :NEXT
385 PLOT 25,25,25,30,16,29,23:PRINT "-";Z
390 Y= Y+ 2
395 Z= Z+ 1
396 W= W+ 1
397 IF W= 15THEN W= 0:P= P+ 20:Y= 0
400 GOTO 301
401 IF N< - 1THEN 414
402 PLOT 3,42,26:PRINT "ENTER -1 TO CHANGE"
403 PLOT 3,42,27:PRINT "  PATTERN MANUALLY"
404 PLOT 3,42,29:PRINT "ENTER -2 TO CHANGE"
405 PLOT 3,42,30:PRINT "  IT AUTOMATICALLY"
410 PLOT 3,42,18:PRINT "COLOR NUMBER  :     ";:PLOT 3,59,18:INPUT N
414 IF N< 0THEN GOSUB 800:GOTO 150
415 IF N= 0THEN END
416 IF N< 1OR N> 35THEN 410
420 PLOT 3,42,20:PRINT "FOREGROUND = ";:GOSUB 570
430 PLOT 3,42,22:PRINT "BACKGROUND = ";:GOSUB 560
440 GOTO 410
500 DATA 21,16,20,17,21,20,23,20,21,21,20,16,20,20,22,20
510 DATA 22,16,20,18,22,22,23,22,18,16,18,18,19,18,22,18
520 DATA 22,19,23,18,23,19,19,19,18,17,19,16,19,17,23,17
530 DATA 21,19,23,21,21,17,17,17,17,16,23,16,22,17,21,18
540 DATA 22,21,20,19,23,23,0,0
555 END
560 ON E(N)- 15GOTO 580,590,600,610,620,630,640,650
570 ON F(N)- 15GOTO 580,590,600,610,620,630,640,650
580 PRINT "BLACK   ":RETURN
590 PRINT "RED     ":RETURN
600 PRINT "GREEN   ":RETURN
610 PRINT "YELLOW  ":RETURN
620 PRINT "BLUE    ":RETURN
630 PRINT "MAGENTA ":RETURN
640 PRINT "CYAN    ":RETURN
650 PRINT "WHITE   ":RETURN
660 REM
670 REM  DATA FOR CHAR TO PLOT IN LINE 370
680 REM
690 DATA 96,35,42,64,98,99,100,104,107,115,120,-1
700 DATA 96,99,100,108,109,110,111,112,113,114,115,120,121,122,-1
800 REM
810 REM  GET NEXT CHARACTER
820 REM
830 IF FLG= 29THEN RESTORE 690
840 IF FLG= 30THEN RESTORE 700
850 READ K:IF K< > CHTHEN 850
860 READ CH
870 IF CH= - 1THEN CH= 96
880 IF CH< > 96THEN 910
890 IF FLG= 29THEN FLG= 30:GOTO 910
900 IF FLG= 30THEN FLG= 29:N= 0
910 RETURN