Home » Personal collection » Acorn DFS disks » dfs_box03_disk01b_utilities_disk.scp » W.PATTERN

W.PATTERN

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn DFS disks » dfs_box03_disk01b_utilities_disk.scp
Filename: W.PATTERN
Read OK:
File size: 0715 bytes
Load address: 1900
Exec address: 801F
Duplicates

There are 3 duplicate copies of this file in the archive:

File contents
   10 REM Pattern Generator
   13 REM Version 1.0
   40 ON ERROR GOTO50
   50 MODE7
   80 ON ERROR GOTO 900
  100 CLS:PROCSTART:PROCKEYSETUP
  200 REPEAT
  210 REPEAT S1%=GET-&80:UNTIL (S1%>0)AND(S1%<11)
  220 REPEAT S2%=GET-&80:UNTIL (S2%>0)AND(S2%<11)
  300 MODE5:C1%=RND(6):C2%=C1%MOD6+1:C3%=C2%MOD6+1:C4%=C3%MOD6+1
  310 VDU19,0,C1%;0;19,1,C2%;0;19,2,C3%;0;19,3,C4%;0;5
  320 Z%=5:C%=1:GCOL128,0:CLG
  330 REPEATAC%=RND(5)-1:UNTILAC%<>2
  400 FORY%=0TO1023STEP4*S1%
  410 C%=C%MOD3+1:GCOLAC%,C%
  420 MOVE0,0:PLOTZ%,1278,Y%
  430 MOVE1278,0:PLOTZ%,0,Y%:NEXT
  500 FORX%=0TO1272STEP8*S2%
  510 MOVE0,0:PLOTZ%,(1278-X%),1020
  520 MOVE1278,0:PLOTZ%,X%,1020:NEXT
  530 UNTILFALSE
  900 MODE7
  910 PRINTTAB(5,9);
  920 PRINT"Do you want to go on to"
  930 PRINT"     the next program (Y/N)? ";
  940 PROCYESORNO:IF Y%<0 THEN 910
  950 IF Y%=0 THEN 100
  970 CHAIN "KINGDOM"
 6000 DEFPROCKEYSETUP
 6010 DIMV%100:X%=V%:Y%=V%/256
 6020 FOR K%=0 TO 9
 6030 $V%="*KEY "+STR$(K%)+" ""|!|"+CHR$(K%+65)+"""":CALL&FFF7:NEXT
 6099 ENDPROC
 7000 DEFPROCSTART
 7010 CLS:VDU23;8202;0;0;0;
 7020 FOR I%=0 TO 1:PRINTTAB(15,8+I%);CHR$(&8D);"Pattern";
 7030 PRINTTAB(14,11+I%);CHR$(&8D);"Generator":NEXT:I%=INKEY(300)
 7100 PROCSCREEN
 7110 PRINT'"      This program generates patterns"'"   which  are  displayed  using high-"
 7120 PRINT"   resolution graphics."''
 7130 PRINT"      The  program  produces   random"'"   patterns which need to be triggered"
 7140 PRINT"   by pressing any  two  of the user-"'"   definable keys."''
 7150 PROCSPACE
 7200 PROCSCREEN
 7210 PRINT'"      Each time a pattern finishes,"'"   press two of the user-definable"
 7220 PRINT"   keys in sequence to produce"'"   another pattern, or press ESCAPE"
 7230 PRINT"   to go on to the next program."
 7240 PROCSPACE
 7300 PROCSCREEN
 7310 PRINT"      Start the pattern generation"'"   now, by pressing two user-defined"
 7320 PRINT"   keys in sequence..."
 7399 ENDPROC
 7900 DEFPROCSCREEN
 7910 CLS:FOR I%=1 TO 2
 7920 PRINTTAB(10,I%);CHR$(&8D);"Pattern Generator":NEXT:PRINT'
 7999 ENDPROC
 8000 DEFPROCSPACE
 8010 PRINTTAB(3,22);"Press the SPACE BAR to continue":REPEATUNTILGET$=" "
 8099 ENDPROC
 9200 DEFPROCYESORNO
 9210 Y%=-1
 9220 X%=GET:IF X%=13 AND Y%>=0 THENENDPROC
 9230 X%=X%AND&DF:IFX%<>78ANDX%<>89THEN9220
 9240 Y%=1:IFX%=78THENY%=0
 9250 PRINTCHR$X%;CHR$8;:GOTO9220

 � Pattern Generator

 � Version 1.0
( � � �Tr@
2 �7
P � � � �tDC
d �:�START:�KEYSETUP
� �
�# � S1%=�-&80:� (S1%>0)�(S1%<11)
�# � S2%=�-&80:� (S2%>0)�(S2%<11)
,4 �5:C1%=�(6):C2%=C1%�6+1:C3%=C2%�6+1:C4%=C3%�6+1
63 �19,0,C1%;0;19,1,C2%;0;19,2,C3%;0;19,3,C4%;0;5
@ Z%=5:C%=1:�128,0:�
J �AC%=�(5)-1:�AC%<>2
� �Y%=0�1023�4*S1%
� C%=C%�3+1:�AC%,C%
� �0,0:�Z%,1278,Y%
� �1278,0:�Z%,0,Y%:�
� �X%=0�1272�8*S2%
� �0,0:�Z%,(1278-X%),1020
 �1278,0:�Z%,X%,1020:�
 ��
� �7
� �5,9);
� �"Do you want to go on to"
�& �"     the next program (Y/N)? ";
� �YESORNO:� Y%<0 � �tNC
� � Y%=0 � �Dd@
� � "KINGDOM"
p ��KEYSETUP
z �V%100:X%=V%:Y%=V%/256
� � K%=0 � 9
�6 $V%="*KEY "+�(K%)+" ""|!|"+�(K%+65)+"""":�&FFF7:�
� �
X ��START
b �:�23;8202;0;0;0;
l, � I%=0 � 1:�15,8+I%);�(&8D);"Pattern";
v/ �14,11+I%);�(&8D);"Generator":�:I%=�(300)
� �SCREEN
�V �'"      This program generates patterns"'"   which  are  displayed  using high-"
�! �"   resolution graphics."''
�V �"      The  program  produces   random"'"   patterns which need to be triggered"
�D �"   by pressing any  two  of the user-"'"   definable keys."''
� �SPACE
  �SCREEN
*Q �'"      Each time a pattern finishes,"'"   press two of the user-definable"
4L �"   keys in sequence to produce"'"   another pattern, or press ESCAPE"
>( �"   to go on to the next program."
H �SPACE
� �SCREEN
�Q �"      Start the pattern generation"'"   now, by pressing two user-defined"
� �"   keys in sequence..."
� �
�
 ��SCREEN
� �:� I%=1 � 2
�- �10,I%);�(&8D);"Pattern Generator":�:�'
? �
@ ��SPACE
J6 �3,22);"Press the SPACE BAR to continue":���=" "
� �
#� ��YESORNO
#�
 Y%=-1
$ X%=�:� X%=13 � Y%>=0 ��
$" X%=X%�&DF:�X%<>78�X%<>89��TDd
$ Y%=1:�X%=78�Y%=0
$" �X%;�8;:�TDd
�
00000000  0d 00 0a 18 20 f4 20 50  61 74 74 65 72 6e 20 47  |.... . Pattern G|
00000010  65 6e 65 72 61 74 6f 72  0d 00 0d 12 20 f4 20 56  |enerator.... . V|
00000020  65 72 73 69 6f 6e 20 31  2e 30 0d 00 28 0e 20 ee  |ersion 1.0..(. .|
00000030  20 85 20 e5 8d 54 72 40  0d 00 32 07 20 eb 37 0d  | . ..Tr@..2. .7.|
00000040  00 50 0f 20 ee 20 85 20  e5 20 8d 74 44 43 0d 00  |.P. . . . .tDC..|
00000050  64 17 20 db 3a f2 53 54  41 52 54 3a f2 4b 45 59  |d. .:.START:.KEY|
00000060  53 45 54 55 50 0d 00 c8  06 20 f5 0d 00 d2 23 20  |SETUP.... ....# |
00000070  f5 20 53 31 25 3d a5 2d  26 38 30 3a fd 20 28 53  |. S1%=.-&80:. (S|
00000080  31 25 3e 30 29 80 28 53  31 25 3c 31 31 29 0d 00  |1%>0).(S1%<11)..|
00000090  dc 23 20 f5 20 53 32 25  3d a5 2d 26 38 30 3a fd  |.# . S2%=.-&80:.|
000000a0  20 28 53 32 25 3e 30 29  80 28 53 32 25 3c 31 31  | (S2%>0).(S2%<11|
000000b0  29 0d 01 2c 34 20 eb 35  3a 43 31 25 3d b3 28 36  |)..,4 .5:C1%=.(6|
000000c0  29 3a 43 32 25 3d 43 31  25 83 36 2b 31 3a 43 33  |):C2%=C1%.6+1:C3|
000000d0  25 3d 43 32 25 83 36 2b  31 3a 43 34 25 3d 43 33  |%=C2%.6+1:C4%=C3|
000000e0  25 83 36 2b 31 0d 01 36  33 20 ef 31 39 2c 30 2c  |%.6+1..63 .19,0,|
000000f0  43 31 25 3b 30 3b 31 39  2c 31 2c 43 32 25 3b 30  |C1%;0;19,1,C2%;0|
00000100  3b 31 39 2c 32 2c 43 33  25 3b 30 3b 31 39 2c 33  |;19,2,C3%;0;19,3|
00000110  2c 43 34 25 3b 30 3b 35  0d 01 40 17 20 5a 25 3d  |,C4%;0;5..@. Z%=|
00000120  35 3a 43 25 3d 31 3a e6  31 32 38 2c 30 3a da 0d  |5:C%=1:.128,0:..|
00000130  01 4a 18 20 f5 41 43 25  3d b3 28 35 29 2d 31 3a  |.J. .AC%=.(5)-1:|
00000140  fd 41 43 25 3c 3e 32 0d  01 90 15 20 e3 59 25 3d  |.AC%<>2.... .Y%=|
00000150  30 b8 31 30 32 33 88 34  2a 53 31 25 0d 01 9a 16  |0.1023.4*S1%....|
00000160  20 43 25 3d 43 25 83 33  2b 31 3a e6 41 43 25 2c  | C%=C%.3+1:.AC%,|
00000170  43 25 0d 01 a4 15 20 ec  30 2c 30 3a f0 5a 25 2c  |C%.... .0,0:.Z%,|
00000180  31 32 37 38 2c 59 25 0d  01 ae 17 20 ec 31 32 37  |1278,Y%.... .127|
00000190  38 2c 30 3a f0 5a 25 2c  30 2c 59 25 3a ed 0d 01  |8,0:.Z%,0,Y%:...|
000001a0  f4 15 20 e3 58 25 3d 30  b8 31 32 37 32 88 38 2a  |.. .X%=0.1272.8*|
000001b0  53 32 25 0d 01 fe 1c 20  ec 30 2c 30 3a f0 5a 25  |S2%.... .0,0:.Z%|
000001c0  2c 28 31 32 37 38 2d 58  25 29 2c 31 30 32 30 0d  |,(1278-X%),1020.|
000001d0  02 08 1a 20 ec 31 32 37  38 2c 30 3a f0 5a 25 2c  |... .1278,0:.Z%,|
000001e0  58 25 2c 31 30 32 30 3a  ed 0d 02 12 07 20 fd a3  |X%,1020:..... ..|
000001f0  0d 03 84 07 20 eb 37 0d  03 8e 0c 20 f1 8a 35 2c  |.... .7.... ..5,|
00000200  39 29 3b 0d 03 98 1f 20  f1 22 44 6f 20 79 6f 75  |9);.... ."Do you|
00000210  20 77 61 6e 74 20 74 6f  20 67 6f 20 6f 6e 20 74  | want to go on t|
00000220  6f 22 0d 03 a2 26 20 f1  22 20 20 20 20 20 74 68  |o"...& ."     th|
00000230  65 20 6e 65 78 74 20 70  72 6f 67 72 61 6d 20 28  |e next program (|
00000240  59 2f 4e 29 3f 20 22 3b  0d 03 ac 1b 20 f2 59 45  |Y/N)? ";.... .YE|
00000250  53 4f 52 4e 4f 3a e7 20  59 25 3c 30 20 8c 20 8d  |SORNO:. Y%<0 . .|
00000260  74 4e 43 0d 03 b6 12 20  e7 20 59 25 3d 30 20 8c  |tNC.... . Y%=0 .|
00000270  20 8d 44 64 40 0d 03 ca  10 20 d7 20 22 4b 49 4e  | .Dd@.... . "KIN|
00000280  47 44 4f 4d 22 0d 17 70  0f 20 dd f2 4b 45 59 53  |GDOM"..p. ..KEYS|
00000290  45 54 55 50 0d 17 7a 1b  20 de 56 25 31 30 30 3a  |ETUP..z. .V%100:|
000002a0  58 25 3d 56 25 3a 59 25  3d 56 25 2f 32 35 36 0d  |X%=V%:Y%=V%/256.|
000002b0  17 84 0f 20 e3 20 4b 25  3d 30 20 b8 20 39 0d 17  |... . K%=0 . 9..|
000002c0  8e 36 20 24 56 25 3d 22  2a 4b 45 59 20 22 2b c3  |.6 $V%="*KEY "+.|
000002d0  28 4b 25 29 2b 22 20 22  22 7c 21 7c 22 2b bd 28  |(K%)+" ""|!|"+.(|
000002e0  4b 25 2b 36 35 29 2b 22  22 22 22 3a d6 26 46 46  |K%+65)+"""":.&FF|
000002f0  46 37 3a ed 0d 17 d3 06  20 e1 0d 1b 58 0c 20 dd  |F7:..... ...X. .|
00000300  f2 53 54 41 52 54 0d 1b  62 16 20 db 3a ef 32 33  |.START..b. .:.23|
00000310  3b 38 32 30 32 3b 30 3b  30 3b 30 3b 0d 1b 6c 2c  |;8202;0;0;0;..l,|
00000320  20 e3 20 49 25 3d 30 20  b8 20 31 3a f1 8a 31 35  | . I%=0 . 1:..15|
00000330  2c 38 2b 49 25 29 3b bd  28 26 38 44 29 3b 22 50  |,8+I%);.(&8D);"P|
00000340  61 74 74 65 72 6e 22 3b  0d 1b 76 2f 20 f1 8a 31  |attern";..v/ ..1|
00000350  34 2c 31 31 2b 49 25 29  3b bd 28 26 38 44 29 3b  |4,11+I%);.(&8D);|
00000360  22 47 65 6e 65 72 61 74  6f 72 22 3a ed 3a 49 25  |"Generator":.:I%|
00000370  3d a6 28 33 30 30 29 0d  1b bc 0c 20 f2 53 43 52  |=.(300).... .SCR|
00000380  45 45 4e 0d 1b c6 56 20  f1 27 22 20 20 20 20 20  |EEN...V .'"     |
00000390  20 54 68 69 73 20 70 72  6f 67 72 61 6d 20 67 65  | This program ge|
000003a0  6e 65 72 61 74 65 73 20  70 61 74 74 65 72 6e 73  |nerates patterns|
000003b0  22 27 22 20 20 20 77 68  69 63 68 20 20 61 72 65  |"'"   which  are|
000003c0  20 20 64 69 73 70 6c 61  79 65 64 20 20 75 73 69  |  displayed  usi|
000003d0  6e 67 20 68 69 67 68 2d  22 0d 1b d0 21 20 f1 22  |ng high-"...! ."|
000003e0  20 20 20 72 65 73 6f 6c  75 74 69 6f 6e 20 67 72  |   resolution gr|
000003f0  61 70 68 69 63 73 2e 22  27 27 0d 1b da 56 20 f1  |aphics."''...V .|
00000400  22 20 20 20 20 20 20 54  68 65 20 20 70 72 6f 67  |"      The  prog|
00000410  72 61 6d 20 20 70 72 6f  64 75 63 65 73 20 20 20  |ram  produces   |
00000420  72 61 6e 64 6f 6d 22 27  22 20 20 20 70 61 74 74  |random"'"   patt|
00000430  65 72 6e 73 20 77 68 69  63 68 20 6e 65 65 64 20  |erns which need |
00000440  74 6f 20 62 65 20 74 72  69 67 67 65 72 65 64 22  |to be triggered"|
00000450  0d 1b e4 44 20 f1 22 20  20 20 62 79 20 70 72 65  |...D ."   by pre|
00000460  73 73 69 6e 67 20 61 6e  79 20 20 74 77 6f 20 20  |ssing any  two  |
00000470  6f 66 20 74 68 65 20 75  73 65 72 2d 22 27 22 20  |of the user-"'" |
00000480  20 20 64 65 66 69 6e 61  62 6c 65 20 6b 65 79 73  |  definable keys|
00000490  2e 22 27 27 0d 1b ee 0b  20 f2 53 50 41 43 45 0d  |."''.... .SPACE.|
000004a0  1c 20 0c 20 f2 53 43 52  45 45 4e 0d 1c 2a 51 20  |. . .SCREEN..*Q |
000004b0  f1 27 22 20 20 20 20 20  20 45 61 63 68 20 74 69  |.'"      Each ti|
000004c0  6d 65 20 61 20 70 61 74  74 65 72 6e 20 66 69 6e  |me a pattern fin|
000004d0  69 73 68 65 73 2c 22 27  22 20 20 20 70 72 65 73  |ishes,"'"   pres|
000004e0  73 20 74 77 6f 20 6f 66  20 74 68 65 20 75 73 65  |s two of the use|
000004f0  72 2d 64 65 66 69 6e 61  62 6c 65 22 0d 1c 34 4c  |r-definable"..4L|
00000500  20 f1 22 20 20 20 6b 65  79 73 20 69 6e 20 73 65  | ."   keys in se|
00000510  71 75 65 6e 63 65 20 74  6f 20 70 72 6f 64 75 63  |quence to produc|
00000520  65 22 27 22 20 20 20 61  6e 6f 74 68 65 72 20 70  |e"'"   another p|
00000530  61 74 74 65 72 6e 2c 20  6f 72 20 70 72 65 73 73  |attern, or press|
00000540  20 45 53 43 41 50 45 22  0d 1c 3e 28 20 f1 22 20  | ESCAPE"..>( ." |
00000550  20 20 74 6f 20 67 6f 20  6f 6e 20 74 6f 20 74 68  |  to go on to th|
00000560  65 20 6e 65 78 74 20 70  72 6f 67 72 61 6d 2e 22  |e next program."|
00000570  0d 1c 48 0b 20 f2 53 50  41 43 45 0d 1c 84 0c 20  |..H. .SPACE.... |
00000580  f2 53 43 52 45 45 4e 0d  1c 8e 51 20 f1 22 20 20  |.SCREEN...Q ."  |
00000590  20 20 20 20 53 74 61 72  74 20 74 68 65 20 70 61  |    Start the pa|
000005a0  74 74 65 72 6e 20 67 65  6e 65 72 61 74 69 6f 6e  |ttern generation|
000005b0  22 27 22 20 20 20 6e 6f  77 2c 20 62 79 20 70 72  |"'"   now, by pr|
000005c0  65 73 73 69 6e 67 20 74  77 6f 20 75 73 65 72 2d  |essing two user-|
000005d0  64 65 66 69 6e 65 64 22  0d 1c 98 1e 20 f1 22 20  |defined".... ." |
000005e0  20 20 6b 65 79 73 20 69  6e 20 73 65 71 75 65 6e  |  keys in sequen|
000005f0  63 65 2e 2e 2e 22 0d 1c  e7 06 20 e1 0d 1e dc 0d  |ce...".... .....|
00000600  20 dd f2 53 43 52 45 45  4e 0d 1e e6 11 20 db 3a  | ..SCREEN.... .:|
00000610  e3 20 49 25 3d 31 20 b8  20 32 0d 1e f0 2d 20 f1  |. I%=1 . 2...- .|
00000620  8a 31 30 2c 49 25 29 3b  bd 28 26 38 44 29 3b 22  |.10,I%);.(&8D);"|
00000630  50 61 74 74 65 72 6e 20  47 65 6e 65 72 61 74 6f  |Pattern Generato|
00000640  72 22 3a ed 3a f1 27 0d  1f 3f 06 20 e1 0d 1f 40  |r":.:.'..?. ...@|
00000650  0c 20 dd f2 53 50 41 43  45 0d 1f 4a 36 20 f1 8a  |. ..SPACE..J6 ..|
00000660  33 2c 32 32 29 3b 22 50  72 65 73 73 20 74 68 65  |3,22);"Press the|
00000670  20 53 50 41 43 45 20 42  41 52 20 74 6f 20 63 6f  | SPACE BAR to co|
00000680  6e 74 69 6e 75 65 22 3a  f5 fd be 3d 22 20 22 0d  |ntinue":...=" ".|
00000690  1f a3 06 20 e1 0d 23 f0  0e 20 dd f2 59 45 53 4f  |... ..#.. ..YESO|
000006a0  52 4e 4f 0d 23 fa 0a 20  59 25 3d 2d 31 0d 24 04  |RNO.#.. Y%=-1.$.|
000006b0  1c 20 58 25 3d a5 3a e7  20 58 25 3d 31 33 20 80  |. X%=.:. X%=13 .|
000006c0  20 59 25 3e 3d 30 20 8c  e1 0d 24 0e 22 20 58 25  | Y%>=0 ...$." X%|
000006d0  3d 58 25 80 26 44 46 3a  e7 58 25 3c 3e 37 38 80  |=X%.&DF:.X%<>78.|
000006e0  58 25 3c 3e 38 39 8c 8d  54 44 64 0d 24 18 15 20  |X%<>89..TDd.$.. |
000006f0  59 25 3d 31 3a e7 58 25  3d 37 38 8c 59 25 3d 30  |Y%=1:.X%=78.Y%=0|
00000700  0d 24 22 13 20 f1 bd 58  25 3b bd 38 3b 3a e5 8d  |.$". ..X%;.8;:..|
00000710  54 44 64 0d ff                                    |TDd..|
00000715
W.PATTERN.m0
W.PATTERN.m1
W.PATTERN.m2
W.PATTERN.m4
W.PATTERN.m5