8-Bit Software Online Conversion
Patterns Version 2 - Listing
20REM" Program name "PATTERN"
30REM" Written by M.L.W. 4/6/1988
40REM" Article by Keith Devlin
50REM" Computer Guardian 2/6/1988
60REM" Sent to 8BIT SOFTWARE 16/2/94
70REM" Fiddled with by CJR 21.2.94
71REM" Further fiddling and
72REM" Machine Coding by B.RAW 10/95
73:
74REM" Build table
80 FOR I%=0 TO 90
90 READ D%:!(&900+(I%*4))=D%
100 NEXT
102:
103REM" init
110 *LOAD"BCOD" 2800
120 *FX225,129
130 *FX4,1
140 MODE0
150VDU23;8202;0;0;0;
160N=TIME MOD 90:D=1
162:
170ONERROR
180VDU19,0,0,0,0,0,19,1,7,0,0,0
190PRINT'"Change the D and N values us
ing ZXCV."
200PRINT"Dump the screen (When finishe
d) by pressing D."
210PRINT"Pressing any other key cancel
s dump."
220PRINT'"ESCAPE to return here."'
222PRINTB%,C%'
230INPUT"Val 1? 1-359 RETURN=no change
. "D%:IF D%>0 IF D%<360 D=D%
240INPUT"Val 2? 1-359 RETURN=no change
. "N%:IF N%>0 IF N%<360 N=N%
250VDU 29,640;512;
260MOVE 0,0
262:
270REPEAT
280REPEAT
290C%=N:B%=D
300D%=0
310CLS
320IF S% PRINTTAB(0,0);STR$D;" Z-Down
X-Up"'STR$N;" C-Down V-Up"
330*FX21
340COLOUR 1
360VDU 19,1,RND(6),0,0,0
370VDU 19,0,7,0,0,0
380 CALL &2800
390Z%=INKEY200
400IF Z%<>-1 PROCinput
420IF D% PROCsave
440IF Z%=-1 D=D+1
450UNTILD=90
460D=1
470IF Z%=-1 OR Z%=68 N=N+1
480UNTILN=90
490END
500:
510DEFPROCinput
512REM" Keys >90 large/small toggle
520IFZ%>90 AND ?&29A0=17 THEN ?&29A0=1
8:ENDPROC
530IFZ%>90 AND ?&29A0=18 THEN ?&29A0=1
7:ENDPROC
532REM" Spacebar pause
540IFZ%=32 THEN PRINTTAB(0,0)"Pause
"'" ":REPEAT:Z%=IN
KEY10:UNTILZ%<>-1
542REM" S show values on/off toggle
550IFZ%=83 S%=S% EOR 1
552REM" D screen save to disc
560IFZ%=68 D%=1 ELSE D%=0
562REM" ZXCV change values
570IFZ%=90 IF D>1 D=D-1
580IFZ%=88 IF D<89 D=D+1
590IFZ%=67 IF N>1 N=N-1
600IFZ%=86 IF N<89 N=N+1
610IF Z%<>68 A=360
620ENDPROC
630:
640DEFPROCsave
651PRINTTAB(0,0);"
"'" "
652OSCLI("SAVE SCR"+STR$(V%)+" 3000 80
00")
654OSCLI("ACCESS * L")
656V%=V%+1
660ENDPROC
670:
672REM" SIN(0-90)*2^13
680DATA0,142,285,428,571
690DATA713,856,998,1139
700DATA1281,1422,1562,1702
710DATA1842,1981,2119,2257
720DATA2394,2531,2666,2801
730DATA2935,3068,3200,3331
740DATA3461,3590,3718,3845
750DATA3970,4095,4218,4340
760DATA4460,4580,4697,4814
770DATA4929,5042,5154,5264
780DATA5373,5480,5586,5689
790DATA5791,5891,5990,6086
800DATA6181,6274,6365,6454
810DATA6541,6626,6709,6790
820DATA6869,6946,7021,7093
830DATA7164,7232,7298,7362
840DATA7423,7483,7540,7594
850DATA7647,7697,7745,7790
860DATA7833,7874,7912,7948
870DATA7981,8012,8041,8067
880DATA8090,8111,8130,8146
890DATA8160,8171,8180,8186
900DATA8190,8192