Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_21B.ADF » P/A/DEM5
P/A/DEM5
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 ADFS disks » Electron_User_Group » EUG_21B.ADF |
Filename: | P/A/DEM5 |
Read OK: | ✔ |
File size: | 0735 bytes |
Load address: | FFFF1D00 |
Exec address: | FFFF8023 |
File contents
10REM >Demo5 - Sierpinski Gasket 20REM By Richard Talbot-Watkins 30REM For 8-bit machines 40REM (C) BAU December 1992 50REM Modified by Richard Dimond July 1995 60IF NOT M% MODE 4 70IF PAGE>&1100 GOTO2000 75IF M%:IF D% CALL&9EE 80VDU 23;8202;0;0;0; 90VDU 23;6,20,0;0;0; 100VDU 23;7,29,0;0;0; 110VDU 23;12,12,0;0;0; 120VDU 23;13,&E0,0;0;0; 130HIMEM=&1700 140IF NOT M% OSCLI "LOAD CompM/C" 150screen = &70 160mem = &74 170compress = &900 180expand = &903 185IF D% GOTO1000 190PROCbuild 200PROCplayback 210IF M% END ELSECHAIN"AMENU" 220: 230DEF PROCbuild 240VDU 28,0,31,39,12 250DIM x%(2),y%(2) 260DIM a%(23) 270!mem=&1700 280FOR frame%=1 TO 23 290a%(frame%-1)=!mem 300CLS 310PRINT "Frame ";frame% 320t=20+360*SINRAD(3.75*frame%) 330FOR N%=0 TO 2 340x%(N%)=640+SINRAD(N%*120)*t 350y%(N%)=210+COSRAD(N%*120)*t 360NEXT 370IF RND(-1) 380FOR N%=0 TO 23 390PLOT 69,RND(1023)+SINRAD(frame%/23*360)*40+128,RND(590)+COSRAD(frame%/23*360)*40 400NEXT 410MOVE x%(0),y%(0):MOVE x%(1),y%(1):PLOT 87,x%(2),y%(2) 420IF RND(-TIME) 430x%=x%(0):y%=y%(0):f%=0:m%=10*t 440REPEAT 450PLOT 69,x%,y% 460t%=RND(3)-1 470x%=(x%+x%(t%))DIV 2:y%=(y%+y%(t%))DIV 2 480IF POINT(x%,y%) f%=f%+1 490UNTIL f%=m% 500PRINT CHR$30;SPC8 510!screen=&6700 520CALL compress 530NEXT 540ENDPROC 550: 560DEF PROCplayback 570REPEAT 580!mem=&1700 590FOR N%=0 TO 22:!screen=&6700:!mem=a%(N%):CALL expand:NEXT:FOR N%=22 TO 0 STEP -1:!screen=&6700:!mem=a%(N%):CALL expand:NEXT 600UNTIL NOT INKEY0 610ENDPROC 1000DIM a%(22) 1010FORn%=0TO22:READa%(n%):NEXT 1020IF NOT M% OSCLI"LOAD DAT5 1700" 1030REPEAT 1040!mem=&1700 1050FOR N%=0 TO 22:!screen=&6700:!mem=a%(N%):CALL expand:NEXT:FOR N%=22 TO 0 STEP -1:!screen=&6700:!mem=a%(N%):CALL expand:NEXT 1060UNTIL NOT INKEY0 1070IF M% END ELSECHAIN"AMENU" 1080DATA &1700,&17C5,&18AB,&19BB,&1B1A,&1CBC,&1E88,&20A0,&2301,&2585,&2885,&2BC3,&2F47,&32F4,&3722,&3B71,&3FDD,&4482,&494C,&4E60,&53A5,&5916,&5E99 2000M%=TRUE 2010*FX200,3 2020*LOAD CompM/C 2030IF NOT D% GOTO2080 2040HIMEM=&7D80 2050VDU28,0,31,39,30 2060!&70=&6700:!&74=&1700:!&78=&2A00 2070*LOAD DAT5 2A00 2080VDU21 2090*KEY0 *TAPE|MFORI%=0 TO TOP-PAGE STEP4:I%!&E00=I%!PAGE:NEXT|MPAGE=&E00|MOLD|MRUN|F|M 2100*FX138,0,128
� >Demo5 - Sierpinski Gasket � By Richard Talbot-Watkins � For 8-bit machines (� (C) BAU December 1992 2*� Modified by Richard Dimond July 1995 <� � M% � 4 F� �>&1100 �dPG K� M%:� D% �&9EE P� 23;8202;0;0;0; Z� 23;6,20,0;0;0; d� 23;7,29,0;0;0; n� 23;12,12,0;0;0; x� 23;13,&E0,0;0;0; ��=&1700 �� � M% � "LOAD CompM/C" �screen = &70 �mem = &74 �compress = &900 �expand = &903 �� D% �dhC � �build � �playback �� M% � ��"AMENU" �: �� �build �� 28,0,31,39,12 �� x%(2),y%(2) � a%(23) !mem=&1700 � frame%=1 � 23 "a%(frame%-1)=!mem ,� 6� "Frame ";frame% @t=20+360*��(3.75*frame%) J� N%=0 � 2 Tx%(N%)=640+��(N%*120)*t ^y%(N%)=210+��(N%*120)*t h� r� �(-1) |� N%=0 � 23 �E� 69,�(1023)+��(frame%/23*360)*40+128,�(590)+��(frame%/23*360)*40 �� �0� x%(0),y%(0):� x%(1),y%(1):� 87,x%(2),y%(2) �� �(-�) �"x%=x%(0):y%=y%(0):f%=0:m%=10*t �� �� 69,x%,y% � t%=�(3)-1 �'x%=(x%+x%(t%))� 2:y%=(y%+y%(t%))� 2 �� �x%,y%) f%=f%+1 �� f%=m% �� �30;�8 �!screen=&6700 � compress � � &: 0� �playback :� D!mem=&1700 Nj� N%=0 � 22:!screen=&6700:!mem=a%(N%):� expand:�:� N%=22 � 0 � -1:!screen=&6700:!mem=a%(N%):� expand:� X � � �0 b� �� a%(22) ��n%=0�22:�a%(n%):� �� � M% �"LOAD DAT5 1700" � !mem=&1700 j� N%=0 � 22:!screen=&6700:!mem=a%(N%):� expand:�:� N%=22 � 0 � -1:!screen=&6700:!mem=a%(N%):� expand:� $ � � �0 .� M% � ��"AMENU" 8�� &1700,&17C5,&18AB,&19BB,&1B1A,&1CBC,&1E88,&20A0,&2301,&2585,&2885,&2BC3,&2F47,&32F4,&3722,&3B71,&3FDD,&4482,&494C,&4E60,&53A5,&5916,&5E99 �M%=� �*FX200,3 �*LOAD CompM/C �� � D% �T`H ��=&7D80 �28,0,31,39,30 $!&70=&6700:!&74=&1700:!&78=&2A00 *LOAD DAT5 2A00 �21 *X*KEY0 *TAPE|MFORI%=0 TO TOP-PAGE STEP4:I%!&E00=I%!PAGE:NEXT|MPAGE=&E00|MOLD|MRUN|F|M 4*FX138,0,128 �
00000000 0d 00 0a 20 f4 20 3e 44 65 6d 6f 35 20 2d 20 53 |... . >Demo5 - S| 00000010 69 65 72 70 69 6e 73 6b 69 20 47 61 73 6b 65 74 |ierpinski Gasket| 00000020 0d 00 14 1f f4 20 42 79 20 52 69 63 68 61 72 64 |..... By Richard| 00000030 20 54 61 6c 62 6f 74 2d 57 61 74 6b 69 6e 73 0d | Talbot-Watkins.| 00000040 00 1e 18 f4 20 46 6f 72 20 38 2d 62 69 74 20 6d |.... For 8-bit m| 00000050 61 63 68 69 6e 65 73 0d 00 28 1b f4 20 28 43 29 |achines..(.. (C)| 00000060 20 42 41 55 20 44 65 63 65 6d 62 65 72 20 31 39 | BAU December 19| 00000070 39 32 0d 00 32 2a f4 20 4d 6f 64 69 66 69 65 64 |92..2*. Modified| 00000080 20 62 79 20 52 69 63 68 61 72 64 20 44 69 6d 6f | by Richard Dimo| 00000090 6e 64 20 4a 75 6c 79 20 31 39 39 35 0d 00 3c 0e |nd July 1995..<.| 000000a0 e7 20 ac 20 4d 25 20 eb 20 34 0d 00 46 13 e7 20 |. . M% . 4..F.. | 000000b0 90 3e 26 31 31 30 30 20 e5 8d 64 50 47 0d 00 4b |.>&1100 ..dPG..K| 000000c0 13 e7 20 4d 25 3a e7 20 44 25 20 d6 26 39 45 45 |.. M%:. D% .&9EE| 000000d0 0d 00 50 14 ef 20 32 33 3b 38 32 30 32 3b 30 3b |..P.. 23;8202;0;| 000000e0 30 3b 30 3b 0d 00 5a 14 ef 20 32 33 3b 36 2c 32 |0;0;..Z.. 23;6,2| 000000f0 30 2c 30 3b 30 3b 30 3b 0d 00 64 14 ef 20 32 33 |0,0;0;0;..d.. 23| 00000100 3b 37 2c 32 39 2c 30 3b 30 3b 30 3b 0d 00 6e 15 |;7,29,0;0;0;..n.| 00000110 ef 20 32 33 3b 31 32 2c 31 32 2c 30 3b 30 3b 30 |. 23;12,12,0;0;0| 00000120 3b 0d 00 78 16 ef 20 32 33 3b 31 33 2c 26 45 30 |;..x.. 23;13,&E0| 00000130 2c 30 3b 30 3b 30 3b 0d 00 82 0b d3 3d 26 31 37 |,0;0;0;.....=&17| 00000140 30 30 0d 00 8c 1b e7 20 ac 20 4d 25 20 ff 20 22 |00..... . M% . "| 00000150 4c 4f 41 44 20 43 6f 6d 70 4d 2f 43 22 0d 00 96 |LOAD CompM/C"...| 00000160 12 73 63 72 65 65 6e 20 20 20 3d 20 26 37 30 0d |.screen = &70.| 00000170 00 a0 12 6d 65 6d 20 20 20 20 20 20 3d 20 26 37 |...mem = &7| 00000180 34 0d 00 aa 13 63 6f 6d 70 72 65 73 73 20 3d 20 |4....compress = | 00000190 26 39 30 30 0d 00 b4 13 65 78 70 61 6e 64 20 20 |&900....expand | 000001a0 20 3d 20 26 39 30 33 0d 00 b9 0e e7 20 44 25 20 | = &903..... D% | 000001b0 e5 8d 64 68 43 0d 00 be 0a f2 62 75 69 6c 64 0d |..dhC.....build.| 000001c0 00 c8 0d f2 70 6c 61 79 62 61 63 6b 0d 00 d2 14 |....playback....| 000001d0 e7 20 4d 25 20 e0 20 8b d7 22 41 4d 45 4e 55 22 |. M% . .."AMENU"| 000001e0 0d 00 dc 05 3a 0d 00 e6 0c dd 20 f2 62 75 69 6c |....:..... .buil| 000001f0 64 0d 00 f0 13 ef 20 32 38 2c 30 2c 33 31 2c 33 |d..... 28,0,31,3| 00000200 39 2c 31 32 0d 00 fa 11 de 20 78 25 28 32 29 2c |9,12..... x%(2),| 00000210 79 25 28 32 29 0d 01 04 0c de 20 61 25 28 32 33 |y%(2)..... a%(23| 00000220 29 0d 01 0e 0e 21 6d 65 6d 3d 26 31 37 30 30 0d |)....!mem=&1700.| 00000230 01 18 13 e3 20 66 72 61 6d 65 25 3d 31 20 b8 20 |.... frame%=1 . | 00000240 32 33 0d 01 22 15 61 25 28 66 72 61 6d 65 25 2d |23..".a%(frame%-| 00000250 31 29 3d 21 6d 65 6d 0d 01 2c 05 db 0d 01 36 15 |1)=!mem..,....6.| 00000260 f1 20 22 46 72 61 6d 65 20 22 3b 66 72 61 6d 65 |. "Frame ";frame| 00000270 25 0d 01 40 1c 74 3d 32 30 2b 33 36 30 2a b5 b2 |%..@.t=20+360*..| 00000280 28 33 2e 37 35 2a 66 72 61 6d 65 25 29 0d 01 4a |(3.75*frame%)..J| 00000290 0e e3 20 4e 25 3d 30 20 b8 20 32 0d 01 54 1b 78 |.. N%=0 . 2..T.x| 000002a0 25 28 4e 25 29 3d 36 34 30 2b b5 b2 28 4e 25 2a |%(N%)=640+..(N%*| 000002b0 31 32 30 29 2a 74 0d 01 5e 1b 79 25 28 4e 25 29 |120)*t..^.y%(N%)| 000002c0 3d 32 31 30 2b 9b b2 28 4e 25 2a 31 32 30 29 2a |=210+..(N%*120)*| 000002d0 74 0d 01 68 05 ed 0d 01 72 0b e7 20 b3 28 2d 31 |t..h....r.. .(-1| 000002e0 29 0d 01 7c 0f e3 20 4e 25 3d 30 20 b8 20 32 33 |)..|.. N%=0 . 23| 000002f0 0d 01 86 45 f0 20 36 39 2c b3 28 31 30 32 33 29 |...E. 69,.(1023)| 00000300 2b b5 b2 28 66 72 61 6d 65 25 2f 32 33 2a 33 36 |+..(frame%/23*36| 00000310 30 29 2a 34 30 2b 31 32 38 2c b3 28 35 39 30 29 |0)*40+128,.(590)| 00000320 2b 9b b2 28 66 72 61 6d 65 25 2f 32 33 2a 33 36 |+..(frame%/23*36| 00000330 30 29 2a 34 30 0d 01 90 05 ed 0d 01 9a 30 ec 20 |0)*40........0. | 00000340 78 25 28 30 29 2c 79 25 28 30 29 3a ec 20 78 25 |x%(0),y%(0):. x%| 00000350 28 31 29 2c 79 25 28 31 29 3a f0 20 38 37 2c 78 |(1),y%(1):. 87,x| 00000360 25 28 32 29 2c 79 25 28 32 29 0d 01 a4 0b e7 20 |%(2),y%(2)..... | 00000370 b3 28 2d 91 29 0d 01 ae 22 78 25 3d 78 25 28 30 |.(-.)..."x%=x%(0| 00000380 29 3a 79 25 3d 79 25 28 30 29 3a 66 25 3d 30 3a |):y%=y%(0):f%=0:| 00000390 6d 25 3d 31 30 2a 74 0d 01 b8 05 f5 0d 01 c2 0e |m%=10*t.........| 000003a0 f0 20 36 39 2c 78 25 2c 79 25 0d 01 cc 0d 74 25 |. 69,x%,y%....t%| 000003b0 3d b3 28 33 29 2d 31 0d 01 d6 27 78 25 3d 28 78 |=.(3)-1...'x%=(x| 000003c0 25 2b 78 25 28 74 25 29 29 81 20 32 3a 79 25 3d |%+x%(t%)). 2:y%=| 000003d0 28 79 25 2b 79 25 28 74 25 29 29 81 20 32 0d 01 |(y%+y%(t%)). 2..| 000003e0 e0 15 e7 20 b0 78 25 2c 79 25 29 20 66 25 3d 66 |... .x%,y%) f%=f| 000003f0 25 2b 31 0d 01 ea 0b fd 20 66 25 3d 6d 25 0d 01 |%+1..... f%=m%..| 00000400 f4 0c f1 20 bd 33 30 3b 89 38 0d 01 fe 11 21 73 |... .30;.8....!s| 00000410 63 72 65 65 6e 3d 26 36 37 30 30 0d 02 08 0e d6 |creen=&6700.....| 00000420 20 63 6f 6d 70 72 65 73 73 0d 02 12 05 ed 0d 02 | compress.......| 00000430 1c 05 e1 0d 02 26 05 3a 0d 02 30 0f dd 20 f2 70 |.....&.:..0.. .p| 00000440 6c 61 79 62 61 63 6b 0d 02 3a 05 f5 0d 02 44 0e |layback..:....D.| 00000450 21 6d 65 6d 3d 26 31 37 30 30 0d 02 4e 6a e3 20 |!mem=&1700..Nj. | 00000460 4e 25 3d 30 20 b8 20 32 32 3a 21 73 63 72 65 65 |N%=0 . 22:!scree| 00000470 6e 3d 26 36 37 30 30 3a 21 6d 65 6d 3d 61 25 28 |n=&6700:!mem=a%(| 00000480 4e 25 29 3a d6 20 65 78 70 61 6e 64 3a ed 3a e3 |N%):. expand:.:.| 00000490 20 4e 25 3d 32 32 20 b8 20 30 20 88 20 2d 31 3a | N%=22 . 0 . -1:| 000004a0 21 73 63 72 65 65 6e 3d 26 36 37 30 30 3a 21 6d |!screen=&6700:!m| 000004b0 65 6d 3d 61 25 28 4e 25 29 3a d6 20 65 78 70 61 |em=a%(N%):. expa| 000004c0 6e 64 3a ed 0d 02 58 0a fd 20 ac 20 a6 30 0d 02 |nd:...X.. . .0..| 000004d0 62 05 e1 0d 03 e8 0c de 20 61 25 28 32 32 29 0d |b....... a%(22).| 000004e0 03 f2 16 e3 6e 25 3d 30 b8 32 32 3a f3 61 25 28 |....n%=0.22:.a%(| 000004f0 6e 25 29 3a ed 0d 03 fc 1c e7 20 ac 20 4d 25 20 |n%):...... . M% | 00000500 ff 22 4c 4f 41 44 20 44 41 54 35 20 31 37 30 30 |."LOAD DAT5 1700| 00000510 22 0d 04 06 05 f5 0d 04 10 0e 21 6d 65 6d 3d 26 |".........!mem=&| 00000520 31 37 30 30 0d 04 1a 6a e3 20 4e 25 3d 30 20 b8 |1700...j. N%=0 .| 00000530 20 32 32 3a 21 73 63 72 65 65 6e 3d 26 36 37 30 | 22:!screen=&670| 00000540 30 3a 21 6d 65 6d 3d 61 25 28 4e 25 29 3a d6 20 |0:!mem=a%(N%):. | 00000550 65 78 70 61 6e 64 3a ed 3a e3 20 4e 25 3d 32 32 |expand:.:. N%=22| 00000560 20 b8 20 30 20 88 20 2d 31 3a 21 73 63 72 65 65 | . 0 . -1:!scree| 00000570 6e 3d 26 36 37 30 30 3a 21 6d 65 6d 3d 61 25 28 |n=&6700:!mem=a%(| 00000580 4e 25 29 3a d6 20 65 78 70 61 6e 64 3a ed 0d 04 |N%):. expand:...| 00000590 24 0a fd 20 ac 20 a6 30 0d 04 2e 14 e7 20 4d 25 |$.. . .0..... M%| 000005a0 20 e0 20 8b d7 22 41 4d 45 4e 55 22 0d 04 38 8f | . .."AMENU"..8.| 000005b0 dc 20 26 31 37 30 30 2c 26 31 37 43 35 2c 26 31 |. &1700,&17C5,&1| 000005c0 38 41 42 2c 26 31 39 42 42 2c 26 31 42 31 41 2c |8AB,&19BB,&1B1A,| 000005d0 26 31 43 42 43 2c 26 31 45 38 38 2c 26 32 30 41 |&1CBC,&1E88,&20A| 000005e0 30 2c 26 32 33 30 31 2c 26 32 35 38 35 2c 26 32 |0,&2301,&2585,&2| 000005f0 38 38 35 2c 26 32 42 43 33 2c 26 32 46 34 37 2c |885,&2BC3,&2F47,| 00000600 26 33 32 46 34 2c 26 33 37 32 32 2c 26 33 42 37 |&32F4,&3722,&3B7| 00000610 31 2c 26 33 46 44 44 2c 26 34 34 38 32 2c 26 34 |1,&3FDD,&4482,&4| 00000620 39 34 43 2c 26 34 45 36 30 2c 26 35 33 41 35 2c |94C,&4E60,&53A5,| 00000630 26 35 39 31 36 2c 26 35 45 39 39 0d 07 d0 08 4d |&5916,&5E99....M| 00000640 25 3d b9 0d 07 da 0c 2a 46 58 32 30 30 2c 33 0d |%=.....*FX200,3.| 00000650 07 e4 11 2a 4c 4f 41 44 20 43 6f 6d 70 4d 2f 43 |...*LOAD CompM/C| 00000660 0d 07 ee 10 e7 20 ac 20 44 25 20 e5 8d 54 60 48 |..... . D% ..T`H| 00000670 0d 07 f8 0b d3 3d 26 37 44 38 30 0d 08 02 12 ef |.....=&7D80.....| 00000680 32 38 2c 30 2c 33 31 2c 33 39 2c 33 30 0d 08 0c |28,0,31,39,30...| 00000690 24 21 26 37 30 3d 26 36 37 30 30 3a 21 26 37 34 |$!&70=&6700:!&74| 000006a0 3d 26 31 37 30 30 3a 21 26 37 38 3d 26 32 41 30 |=&1700:!&78=&2A0| 000006b0 30 0d 08 16 13 2a 4c 4f 41 44 20 44 41 54 35 20 |0....*LOAD DAT5 | 000006c0 32 41 30 30 0d 08 20 07 ef 32 31 0d 08 2a 58 2a |2A00.. ..21..*X*| 000006d0 4b 45 59 30 20 2a 54 41 50 45 7c 4d 46 4f 52 49 |KEY0 *TAPE|MFORI| 000006e0 25 3d 30 20 54 4f 20 54 4f 50 2d 50 41 47 45 20 |%=0 TO TOP-PAGE | 000006f0 53 54 45 50 34 3a 49 25 21 26 45 30 30 3d 49 25 |STEP4:I%!&E00=I%| 00000700 21 50 41 47 45 3a 4e 45 58 54 7c 4d 50 41 47 45 |!PAGE:NEXT|MPAGE| 00000710 3d 26 45 30 30 7c 4d 4f 4c 44 7c 4d 52 55 4e 7c |=&E00|MOLD|MRUN|| 00000720 46 7c 4d 0d 08 34 10 2a 46 58 31 33 38 2c 30 2c |F|M..4.*FX138,0,| 00000730 31 32 38 0d ff |128..| 00000735