Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_21B.ADF » P/A/DEM4
P/A/DEM4
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/DEM4 |
Read OK: | ✔ |
File size: | 0744 bytes |
Load address: | FFFF1D00 |
Exec address: | FFFF8023 |
File contents
10REM >Demo4 - Pendulums 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% CALL&9EE 77IF M% VDU24,0;0;1279;640;16 80VDU 23;8202;0;0;0; 90HIMEM=&1800 100IF NOT M% OSCLI "LOAD CompM/C" 110screen = &70 120mem = &74 130compress = &900 140expand = &903 145IF D% GOTO1000 150PROCbuild 160PROCplayback 170IF M% END ELSECHAIN"AMENU" 180: 190DEF PROCbuild 200DIM a%(26) 210VDU 23,128,3,12,16,32,64,64,128,128 220VDU 23,129,192,48,8,4,2,2,1,1 230VDU 23,130,128,128,64,64,32,16,12,3 240VDU 23,131,1,1,2,2,4,8,48,192 250!mem=&1800 260FOR frame%=1 TO 27 270a%(frame%-1)=!mem 280CLS 290PRINT "Frame ";frame% 300PROCpend(640,1023,15*SINRAD((180/28)*frame%+90),50) 310PROCpend(960,1023,15*SINRAD((180/14)*frame%+90),25) 320PROCpend(320,1023,15*SINRAD((180/7)*frame%+90),13) 330PRINT CHR$30;SPC8 340!screen=&5800 350CALL compress 360NEXT 370ENDPROC 380: 390DEF PROCpend(x%,y%,t,len) 400LOCAL ang 410ang=t 420MOVE x%,y% 430REPEAT 440PLOT 1,len*SINRADang,-len*COSRADang 450ang=ang+t/8 460len=len*.95 470UNTIL len<4 480PLOT 0,(len+30)*SINRADang-32,-(len+30)*COSRADang+32 490VDU 5,128,129,8,8,10,130,131,4 500ENDPROC 510: 520DEF PROCplayback 530REPEAT 540!mem=&1800 550FOR N%=0 TO 26:!screen=&5800:!mem=a%(N%):CALL expand:NEXT:FOR N%=26 TO 0 STEP -1:!screen=&5800:!mem=a%(N%):CALL expand:NEXT 560UNTIL NOT INKEY0 570ENDPROC 1000DIM a%(26) 1010FORn%=0TO26:READa%(n%):NEXT 1020IF NOT M% OSCLI"LOAD DAT4 1800" 1030REPEAT 1040!mem=&1800 1050FOR N%=0 TO 26:!screen=&5800:!mem=a%(N%):CALL expand:NEXT:FOR N%=26 TO 0 STEP -1:!screen=&5800:!mem=a%(N%):CALL expand:NEXT 1060UNTIL NOT INKEY0 1070IF M% END ELSECHAIN"AMENU" 1080DATA &1800,&1A7A,&1CEF,&1F58,&21CF,&2448,&26AE,&2903,&2B77,&2DFE,&306B,&32C5,&351A,&374D,&395C,&3B90,&3DDD,&402B,&427C,&44DC,&4728,&495B,&4BA3,&4E01,&5056,&52A0,&54F1 2000M%=TRUE 2010*FX200,3 2020*LOAD CompM/C 2030IF NOT D% GOTO2080 2040HIMEM=&7D80 2050VDU28,0,31,39,30 2060!&70=&5800:!&74=&1800:!&78=&2A00 2070*LOAD DAT4 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
� >Demo4 - Pendulums � 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% �&9EE M� M% �24,0;0;1279;640;16 P� 23;8202;0;0;0; Z�=&1800 d� � M% � "LOAD CompM/C" nscreen = &70 xmem = &74 �compress = &900 �expand = &903 �� D% �dhC � �build � �playback �� M% � ��"AMENU" �: �� �build �� a%(26) �%� 23,128,3,12,16,32,64,64,128,128 �� 23,129,192,48,8,4,2,2,1,1 �%� 23,130,128,128,64,64,32,16,12,3 �� 23,131,1,1,2,2,4,8,48,192 �!mem=&1800 � frame%=1 � 27 a%(frame%-1)=!mem � "� "Frame ";frame% ,0�pend(640,1023,15*��((180/28)*frame%+90),50) 60�pend(960,1023,15*��((180/14)*frame%+90),25) @/�pend(320,1023,15*��((180/7)*frame%+90),13) J� �30;�8 T!screen=&5800 ^� compress h� r� |: �� �pend(x%,y%,t,len) � � ang � ang=t �� x%,y% �� �� 1,len*��ang,-len*��ang �ang=ang+t/8 �len=len*.95 �� len<4 �,� 0,(len+30)*��ang-32,-(len+30)*��ang+32 � � 5,128,129,8,8,10,130,131,4 �� �: � �playback � !mem=&1800 &j� N%=0 � 26:!screen=&5800:!mem=a%(N%):� expand:�:� N%=26 � 0 � -1:!screen=&5800:!mem=a%(N%):� expand:� 0 � � �0 :� �� a%(26) ��n%=0�26:�a%(n%):� �� � M% �"LOAD DAT4 1800" � !mem=&1800 j� N%=0 � 26:!screen=&5800:!mem=a%(N%):� expand:�:� N%=26 � 0 � -1:!screen=&5800:!mem=a%(N%):� expand:� $ � � �0 .� M% � ��"AMENU" 8�� &1800,&1A7A,&1CEF,&1F58,&21CF,&2448,&26AE,&2903,&2B77,&2DFE,&306B,&32C5,&351A,&374D,&395C,&3B90,&3DDD,&402B,&427C,&44DC,&4728,&495B,&4BA3,&4E01,&5056,&52A0,&54F1 �M%=� �*FX200,3 �*LOAD CompM/C �� � D% �T`H ��=&7D80 �28,0,31,39,30 $!&70=&5800:!&74=&1800:!&78=&2A00 *LOAD DAT4 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 18 f4 20 3e 44 65 6d 6f 34 20 2d 20 50 |..... >Demo4 - P| 00000010 65 6e 64 75 6c 75 6d 73 0d 00 14 1f f4 20 42 79 |endulums..... By| 00000020 20 52 69 63 68 61 72 64 20 54 61 6c 62 6f 74 2d | Richard Talbot-| 00000030 57 61 74 6b 69 6e 73 0d 00 1e 18 f4 20 46 6f 72 |Watkins..... For| 00000040 20 38 2d 62 69 74 20 6d 61 63 68 69 6e 65 73 0d | 8-bit machines.| 00000050 00 28 1b f4 20 28 43 29 20 42 41 55 20 44 65 63 |.(.. (C) BAU Dec| 00000060 65 6d 62 65 72 20 31 39 39 32 0d 00 32 2a f4 20 |ember 1992..2*. | 00000070 4d 6f 64 69 66 69 65 64 20 62 79 20 52 69 63 68 |Modified by Rich| 00000080 61 72 64 20 44 69 6d 6f 6e 64 20 4a 75 6c 79 20 |ard Dimond July | 00000090 31 39 39 35 0d 00 3c 0e e7 20 ac 20 4d 25 20 eb |1995..<.. . M% .| 000000a0 20 34 0d 00 46 13 e7 20 90 3e 26 31 31 30 30 20 | 4..F.. .>&1100 | 000000b0 e5 8d 64 50 47 0d 00 4b 0e e7 20 4d 25 20 d6 26 |..dPG..K.. M% .&| 000000c0 39 45 45 0d 00 4d 1c e7 20 4d 25 20 ef 32 34 2c |9EE..M.. M% .24,| 000000d0 30 3b 30 3b 31 32 37 39 3b 36 34 30 3b 31 36 0d |0;0;1279;640;16.| 000000e0 00 50 14 ef 20 32 33 3b 38 32 30 32 3b 30 3b 30 |.P.. 23;8202;0;0| 000000f0 3b 30 3b 0d 00 5a 0b d3 3d 26 31 38 30 30 0d 00 |;0;..Z..=&1800..| 00000100 64 1b e7 20 ac 20 4d 25 20 ff 20 22 4c 4f 41 44 |d.. . M% . "LOAD| 00000110 20 43 6f 6d 70 4d 2f 43 22 0d 00 6e 12 73 63 72 | CompM/C"..n.scr| 00000120 65 65 6e 20 20 20 3d 20 26 37 30 0d 00 78 12 6d |een = &70..x.m| 00000130 65 6d 20 20 20 20 20 20 3d 20 26 37 34 0d 00 82 |em = &74...| 00000140 13 63 6f 6d 70 72 65 73 73 20 3d 20 26 39 30 30 |.compress = &900| 00000150 0d 00 8c 13 65 78 70 61 6e 64 20 20 20 3d 20 26 |....expand = &| 00000160 39 30 33 0d 00 91 0e e7 20 44 25 20 e5 8d 64 68 |903..... D% ..dh| 00000170 43 0d 00 96 0a f2 62 75 69 6c 64 0d 00 a0 0d f2 |C.....build.....| 00000180 70 6c 61 79 62 61 63 6b 0d 00 aa 14 e7 20 4d 25 |playback..... M%| 00000190 20 e0 20 8b d7 22 41 4d 45 4e 55 22 0d 00 b4 05 | . .."AMENU"....| 000001a0 3a 0d 00 be 0c dd 20 f2 62 75 69 6c 64 0d 00 c8 |:..... .build...| 000001b0 0c de 20 61 25 28 32 36 29 0d 00 d2 25 ef 20 32 |.. a%(26)...%. 2| 000001c0 33 2c 31 32 38 2c 33 2c 31 32 2c 31 36 2c 33 32 |3,128,3,12,16,32| 000001d0 2c 36 34 2c 36 34 2c 31 32 38 2c 31 32 38 0d 00 |,64,64,128,128..| 000001e0 dc 1f ef 20 32 33 2c 31 32 39 2c 31 39 32 2c 34 |... 23,129,192,4| 000001f0 38 2c 38 2c 34 2c 32 2c 32 2c 31 2c 31 0d 00 e6 |8,8,4,2,2,1,1...| 00000200 25 ef 20 32 33 2c 31 33 30 2c 31 32 38 2c 31 32 |%. 23,130,128,12| 00000210 38 2c 36 34 2c 36 34 2c 33 32 2c 31 36 2c 31 32 |8,64,64,32,16,12| 00000220 2c 33 0d 00 f0 1f ef 20 32 33 2c 31 33 31 2c 31 |,3..... 23,131,1| 00000230 2c 31 2c 32 2c 32 2c 34 2c 38 2c 34 38 2c 31 39 |,1,2,2,4,8,48,19| 00000240 32 0d 00 fa 0e 21 6d 65 6d 3d 26 31 38 30 30 0d |2....!mem=&1800.| 00000250 01 04 13 e3 20 66 72 61 6d 65 25 3d 31 20 b8 20 |.... frame%=1 . | 00000260 32 37 0d 01 0e 15 61 25 28 66 72 61 6d 65 25 2d |27....a%(frame%-| 00000270 31 29 3d 21 6d 65 6d 0d 01 18 05 db 0d 01 22 15 |1)=!mem.......".| 00000280 f1 20 22 46 72 61 6d 65 20 22 3b 66 72 61 6d 65 |. "Frame ";frame| 00000290 25 0d 01 2c 30 f2 70 65 6e 64 28 36 34 30 2c 31 |%..,0.pend(640,1| 000002a0 30 32 33 2c 31 35 2a b5 b2 28 28 31 38 30 2f 32 |023,15*..((180/2| 000002b0 38 29 2a 66 72 61 6d 65 25 2b 39 30 29 2c 35 30 |8)*frame%+90),50| 000002c0 29 0d 01 36 30 f2 70 65 6e 64 28 39 36 30 2c 31 |)..60.pend(960,1| 000002d0 30 32 33 2c 31 35 2a b5 b2 28 28 31 38 30 2f 31 |023,15*..((180/1| 000002e0 34 29 2a 66 72 61 6d 65 25 2b 39 30 29 2c 32 35 |4)*frame%+90),25| 000002f0 29 0d 01 40 2f f2 70 65 6e 64 28 33 32 30 2c 31 |)..@/.pend(320,1| 00000300 30 32 33 2c 31 35 2a b5 b2 28 28 31 38 30 2f 37 |023,15*..((180/7| 00000310 29 2a 66 72 61 6d 65 25 2b 39 30 29 2c 31 33 29 |)*frame%+90),13)| 00000320 0d 01 4a 0c f1 20 bd 33 30 3b 89 38 0d 01 54 11 |..J.. .30;.8..T.| 00000330 21 73 63 72 65 65 6e 3d 26 35 38 30 30 0d 01 5e |!screen=&5800..^| 00000340 0e d6 20 63 6f 6d 70 72 65 73 73 0d 01 68 05 ed |.. compress..h..| 00000350 0d 01 72 05 e1 0d 01 7c 05 3a 0d 01 86 18 dd 20 |..r....|.:..... | 00000360 f2 70 65 6e 64 28 78 25 2c 79 25 2c 74 2c 6c 65 |.pend(x%,y%,t,le| 00000370 6e 29 0d 01 90 09 ea 20 61 6e 67 0d 01 9a 09 61 |n)..... ang....a| 00000380 6e 67 3d 74 0d 01 a4 0b ec 20 78 25 2c 79 25 0d |ng=t..... x%,y%.| 00000390 01 ae 05 f5 0d 01 b8 1c f0 20 31 2c 6c 65 6e 2a |......... 1,len*| 000003a0 b5 b2 61 6e 67 2c 2d 6c 65 6e 2a 9b b2 61 6e 67 |..ang,-len*..ang| 000003b0 0d 01 c2 0f 61 6e 67 3d 61 6e 67 2b 74 2f 38 0d |....ang=ang+t/8.| 000003c0 01 cc 0f 6c 65 6e 3d 6c 65 6e 2a 2e 39 35 0d 01 |...len=len*.95..| 000003d0 d6 0b fd 20 6c 65 6e 3c 34 0d 01 e0 2c f0 20 30 |... len<4...,. 0| 000003e0 2c 28 6c 65 6e 2b 33 30 29 2a b5 b2 61 6e 67 2d |,(len+30)*..ang-| 000003f0 33 32 2c 2d 28 6c 65 6e 2b 33 30 29 2a 9b b2 61 |32,-(len+30)*..a| 00000400 6e 67 2b 33 32 0d 01 ea 20 ef 20 35 2c 31 32 38 |ng+32... . 5,128| 00000410 2c 31 32 39 2c 38 2c 38 2c 31 30 2c 31 33 30 2c |,129,8,8,10,130,| 00000420 31 33 31 2c 34 0d 01 f4 05 e1 0d 01 fe 05 3a 0d |131,4.........:.| 00000430 02 08 0f dd 20 f2 70 6c 61 79 62 61 63 6b 0d 02 |.... .playback..| 00000440 12 05 f5 0d 02 1c 0e 21 6d 65 6d 3d 26 31 38 30 |.......!mem=&180| 00000450 30 0d 02 26 6a e3 20 4e 25 3d 30 20 b8 20 32 36 |0..&j. N%=0 . 26| 00000460 3a 21 73 63 72 65 65 6e 3d 26 35 38 30 30 3a 21 |:!screen=&5800:!| 00000470 6d 65 6d 3d 61 25 28 4e 25 29 3a d6 20 65 78 70 |mem=a%(N%):. exp| 00000480 61 6e 64 3a ed 3a e3 20 4e 25 3d 32 36 20 b8 20 |and:.:. N%=26 . | 00000490 30 20 88 20 2d 31 3a 21 73 63 72 65 65 6e 3d 26 |0 . -1:!screen=&| 000004a0 35 38 30 30 3a 21 6d 65 6d 3d 61 25 28 4e 25 29 |5800:!mem=a%(N%)| 000004b0 3a d6 20 65 78 70 61 6e 64 3a ed 0d 02 30 0a fd |:. expand:...0..| 000004c0 20 ac 20 a6 30 0d 02 3a 05 e1 0d 03 e8 0c de 20 | . .0..:....... | 000004d0 61 25 28 32 36 29 0d 03 f2 16 e3 6e 25 3d 30 b8 |a%(26).....n%=0.| 000004e0 32 36 3a f3 61 25 28 6e 25 29 3a ed 0d 03 fc 1c |26:.a%(n%):.....| 000004f0 e7 20 ac 20 4d 25 20 ff 22 4c 4f 41 44 20 44 41 |. . M% ."LOAD DA| 00000500 54 34 20 31 38 30 30 22 0d 04 06 05 f5 0d 04 10 |T4 1800"........| 00000510 0e 21 6d 65 6d 3d 26 31 38 30 30 0d 04 1a 6a e3 |.!mem=&1800...j.| 00000520 20 4e 25 3d 30 20 b8 20 32 36 3a 21 73 63 72 65 | N%=0 . 26:!scre| 00000530 65 6e 3d 26 35 38 30 30 3a 21 6d 65 6d 3d 61 25 |en=&5800:!mem=a%| 00000540 28 4e 25 29 3a d6 20 65 78 70 61 6e 64 3a ed 3a |(N%):. expand:.:| 00000550 e3 20 4e 25 3d 32 36 20 b8 20 30 20 88 20 2d 31 |. N%=26 . 0 . -1| 00000560 3a 21 73 63 72 65 65 6e 3d 26 35 38 30 30 3a 21 |:!screen=&5800:!| 00000570 6d 65 6d 3d 61 25 28 4e 25 29 3a d6 20 65 78 70 |mem=a%(N%):. exp| 00000580 61 6e 64 3a ed 0d 04 24 0a fd 20 ac 20 a6 30 0d |and:...$.. . .0.| 00000590 04 2e 14 e7 20 4d 25 20 e0 20 8b d7 22 41 4d 45 |.... M% . .."AME| 000005a0 4e 55 22 0d 04 38 a7 dc 20 26 31 38 30 30 2c 26 |NU"..8.. &1800,&| 000005b0 31 41 37 41 2c 26 31 43 45 46 2c 26 31 46 35 38 |1A7A,&1CEF,&1F58| 000005c0 2c 26 32 31 43 46 2c 26 32 34 34 38 2c 26 32 36 |,&21CF,&2448,&26| 000005d0 41 45 2c 26 32 39 30 33 2c 26 32 42 37 37 2c 26 |AE,&2903,&2B77,&| 000005e0 32 44 46 45 2c 26 33 30 36 42 2c 26 33 32 43 35 |2DFE,&306B,&32C5| 000005f0 2c 26 33 35 31 41 2c 26 33 37 34 44 2c 26 33 39 |,&351A,&374D,&39| 00000600 35 43 2c 26 33 42 39 30 2c 26 33 44 44 44 2c 26 |5C,&3B90,&3DDD,&| 00000610 34 30 32 42 2c 26 34 32 37 43 2c 26 34 34 44 43 |402B,&427C,&44DC| 00000620 2c 26 34 37 32 38 2c 26 34 39 35 42 2c 26 34 42 |,&4728,&495B,&4B| 00000630 41 33 2c 26 34 45 30 31 2c 26 35 30 35 36 2c 26 |A3,&4E01,&5056,&| 00000640 35 32 41 30 2c 26 35 34 46 31 0d 07 d0 08 4d 25 |52A0,&54F1....M%| 00000650 3d b9 0d 07 da 0c 2a 46 58 32 30 30 2c 33 0d 07 |=.....*FX200,3..| 00000660 e4 11 2a 4c 4f 41 44 20 43 6f 6d 70 4d 2f 43 0d |..*LOAD CompM/C.| 00000670 07 ee 10 e7 20 ac 20 44 25 20 e5 8d 54 60 48 0d |.... . D% ..T`H.| 00000680 07 f8 0b d3 3d 26 37 44 38 30 0d 08 02 12 ef 32 |....=&7D80.....2| 00000690 38 2c 30 2c 33 31 2c 33 39 2c 33 30 0d 08 0c 24 |8,0,31,39,30...$| 000006a0 21 26 37 30 3d 26 35 38 30 30 3a 21 26 37 34 3d |!&70=&5800:!&74=| 000006b0 26 31 38 30 30 3a 21 26 37 38 3d 26 32 41 30 30 |&1800:!&78=&2A00| 000006c0 0d 08 16 13 2a 4c 4f 41 44 20 44 41 54 34 20 32 |....*LOAD DAT4 2| 000006d0 41 30 30 0d 08 20 07 ef 32 31 0d 08 2a 58 2a 4b |A00.. ..21..*X*K| 000006e0 45 59 30 20 2a 54 41 50 45 7c 4d 46 4f 52 49 25 |EY0 *TAPE|MFORI%| 000006f0 3d 30 20 54 4f 20 54 4f 50 2d 50 41 47 45 20 53 |=0 TO TOP-PAGE S| 00000700 54 45 50 34 3a 49 25 21 26 45 30 30 3d 49 25 21 |TEP4:I%!&E00=I%!| 00000710 50 41 47 45 3a 4e 45 58 54 7c 4d 50 41 47 45 3d |PAGE:NEXT|MPAGE=| 00000720 26 45 30 30 7c 4d 4f 4c 44 7c 4d 52 55 4e 7c 46 |&E00|MOLD|MRUN|F| 00000730 7c 4d 0d 08 34 10 2a 46 58 31 33 38 2c 30 2c 31 ||M..4.*FX138,0,1| 00000740 32 38 0d ff |28..| 00000744