Home » Personal collection » Acorn hard disk » demos » Demo » Sillies/Maggots2

Sillies/Maggots2

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 hard disk » demos » Demo
Filename: Sillies/Maggots2
Read OK:
File size: 040C bytes
Load address: 0000
Exec address: 0000
File contents
   10MODE 15
   20OFF
   30MOUSE ON
   40n=10:size=10:hsize=5:boomsize=30
   50DIM x(100),y(100),h(100),v(100),k(100),a(8),b(8),s(8)
   60REPEAT
   70REPEAT
   80mx=RND(10)-5
   90my=RND(10)-5
  100UNTIL mx<>0 AND my<>0
  110MOUSE STEP mx,my
  120FOR i=1 TO n
  130x(i)=RND(1023)
  140y(i)=RND(1269)
  150k(i)=0
  160NEXT
  170REPEAT
  180PRINT TAB(1,1),"Written by the person who wrote maggots (what a sad chap!!)"
  190killed=0
  200FOR i=1 TO n
  210IF k(i)=1 THEN
  220 killed=killed+1
  230ELSE
  240GCOL 2
  250CIRCLEFILLh(i),v(i),size
  260h(i)=x(i)
  270v(i)=y(i)
  280x(i)=x(i)+RND(20)-10
  290y(i)=y(i)+RND(20)-10
  300IF x(i)>1269 THEN x(i)=0
  310IF x(i)<0 THEN x(i)=1269
  320IF y(i)>1023 THEN y(i)=0
  330IF y(i)<0 THEN y(i)=1023
  340GCOL 7
  350CIRCLEFILLx(i),y(i),size
  360CIRCLEFILLh(i),v(i),size
  370MOUSE t,h,mb
  380IF mb=4 THEN
  390 IF x(i)>t-hsize AND x(i)<t+hsize AND y(i)>h-hsize AND y(i)<h+hsize THEN k(i)=1:PROCsplat(x(i),y(i))
  400 GCOL 115 :POINT t,h
  410ENDIF
  420ENDIF
  430NEXT i
  440UNTIL killed=n
  450MOUSE STEP 5
  460UNTIL 0
  470END
  480:
  490DEF PROCsplat(g,e)
  500GCOL RND(255)
  510s=3+RND(4)
  520FOR w=1 TO s
  530a(w)=w*360/s+RND(30)
  540b(w)=180/s
  550s(w)=-RND(1)*5-2
  560NEXT
  570FORd=9TO300STEP22
  580FORw=1TOs
  590CIRCLEFILL g+d*COSRADa(w),e+d*SINRADa(w),b(w)
  600b(w)+=s(w):s(w)+=.3
  610NEXT
  620NEXT
  630ENDPROC

� 15
�
ȗ �
($n=10:size=10:hsize=5:boomsize=30
27� x(100),y(100),h(100),v(100),k(100),a(8),b(8),s(8)
<�
F�
Pmx=�(10)-5
Zmy=�(10)-5
d� mx<>0 � my<>0
nȗ � mx,my
x
� i=1 � n
�x(i)=�(1023)
�y(i)=�(1269)
�
k(i)=0
��
��
�I� �1,1),"Written by the person who wrote maggots (what a sad chap!!)"
�killed=0
�
� i=1 � n
�� k(i)=1 �
� killed=killed+1
��
�� 2
�ȏȐh(i),v(i),size

h(i)=x(i)

v(i)=y(i)
x(i)=x(i)+�(20)-10
"y(i)=y(i)+�(20)-10
,� x(i)>1269 � x(i)=0
6� x(i)<0 � x(i)=1269
@� y(i)>1023 � y(i)=0
J� y(i)<0 � y(i)=1023
T� 7
^ȏȐx(i),y(i),size
hȏȐh(i),v(i),size
r
ȗ t,h,mb
|� mb=4 �
�[ � x(i)>t-hsize � x(i)<t+hsize � y(i)>h-hsize � y(i)<h+hsize � k(i)=1:�splat(x(i),y(i))
� � 115 :Ȓ t,h
��
��
�� i
�� killed=n
�
ȗ � 5
�� 0
��
�:
�� �splat(g,e)
�� �(255)
�s=3+�(4)

� w=1 � s
a(w)=w*360/s+�(30)
b(w)=180/s
&s(w)=-�(1)*5-2
0�
:�d=9�300�22
D
�w=1�s
N#ȏȐ g+d*��a(w),e+d*��a(w),b(w)
Xb(w)+=s(w):s(w)+=.3
b�
l�
v�
�
00000000  0d 00 0a 08 eb 20 31 35  0d 00 14 05 87 0d 00 1e  |..... 15........|
00000010  08 c8 97 20 ee 0d 00 28  24 6e 3d 31 30 3a 73 69  |... ...($n=10:si|
00000020  7a 65 3d 31 30 3a 68 73  69 7a 65 3d 35 3a 62 6f  |ze=10:hsize=5:bo|
00000030  6f 6d 73 69 7a 65 3d 33  30 0d 00 32 37 de 20 78  |omsize=30..27. x|
00000040  28 31 30 30 29 2c 79 28  31 30 30 29 2c 68 28 31  |(100),y(100),h(1|
00000050  30 30 29 2c 76 28 31 30  30 29 2c 6b 28 31 30 30  |00),v(100),k(100|
00000060  29 2c 61 28 38 29 2c 62  28 38 29 2c 73 28 38 29  |),a(8),b(8),s(8)|
00000070  0d 00 3c 05 f5 0d 00 46  05 f5 0d 00 50 0e 6d 78  |..<....F....P.mx|
00000080  3d b3 28 31 30 29 2d 35  0d 00 5a 0e 6d 79 3d b3  |=.(10)-5..Z.my=.|
00000090  28 31 30 29 2d 35 0d 00  64 13 fd 20 6d 78 3c 3e  |(10)-5..d.. mx<>|
000000a0  30 20 80 20 6d 79 3c 3e  30 0d 00 6e 0e c8 97 20  |0 . my<>0..n... |
000000b0  88 20 6d 78 2c 6d 79 0d  00 78 0d e3 20 69 3d 31  |. mx,my..x.. i=1|
000000c0  20 b8 20 6e 0d 00 82 10  78 28 69 29 3d b3 28 31  | . n....x(i)=.(1|
000000d0  30 32 33 29 0d 00 8c 10  79 28 69 29 3d b3 28 31  |023)....y(i)=.(1|
000000e0  32 36 39 29 0d 00 96 0a  6b 28 69 29 3d 30 0d 00  |269)....k(i)=0..|
000000f0  a0 05 ed 0d 00 aa 05 f5  0d 00 b4 49 f1 20 8a 31  |...........I. .1|
00000100  2c 31 29 2c 22 57 72 69  74 74 65 6e 20 62 79 20  |,1),"Written by |
00000110  74 68 65 20 70 65 72 73  6f 6e 20 77 68 6f 20 77  |the person who w|
00000120  72 6f 74 65 20 6d 61 67  67 6f 74 73 20 28 77 68  |rote maggots (wh|
00000130  61 74 20 61 20 73 61 64  20 63 68 61 70 21 21 29  |at a sad chap!!)|
00000140  22 0d 00 be 0c 6b 69 6c  6c 65 64 3d 30 0d 00 c8  |"....killed=0...|
00000150  0d e3 20 69 3d 31 20 b8  20 6e 0d 00 d2 0e e7 20  |.. i=1 . n..... |
00000160  6b 28 69 29 3d 31 20 8c  0d 00 dc 14 20 6b 69 6c  |k(i)=1 ..... kil|
00000170  6c 65 64 3d 6b 69 6c 6c  65 64 2b 31 0d 00 e6 05  |led=killed+1....|
00000180  cc 0d 00 f0 07 e6 20 32  0d 00 fa 16 c8 8f c8 90  |...... 2........|
00000190  68 28 69 29 2c 76 28 69  29 2c 73 69 7a 65 0d 01  |h(i),v(i),size..|
000001a0  04 0d 68 28 69 29 3d 78  28 69 29 0d 01 0e 0d 76  |..h(i)=x(i)....v|
000001b0  28 69 29 3d 79 28 69 29  0d 01 18 16 78 28 69 29  |(i)=y(i)....x(i)|
000001c0  3d 78 28 69 29 2b b3 28  32 30 29 2d 31 30 0d 01  |=x(i)+.(20)-10..|
000001d0  22 16 79 28 69 29 3d 79  28 69 29 2b b3 28 32 30  |".y(i)=y(i)+.(20|
000001e0  29 2d 31 30 0d 01 2c 18  e7 20 78 28 69 29 3e 31  |)-10..,.. x(i)>1|
000001f0  32 36 39 20 8c 20 78 28  69 29 3d 30 0d 01 36 18  |269 . x(i)=0..6.|
00000200  e7 20 78 28 69 29 3c 30  20 8c 20 78 28 69 29 3d  |. x(i)<0 . x(i)=|
00000210  31 32 36 39 0d 01 40 18  e7 20 79 28 69 29 3e 31  |1269..@.. y(i)>1|
00000220  30 32 33 20 8c 20 79 28  69 29 3d 30 0d 01 4a 18  |023 . y(i)=0..J.|
00000230  e7 20 79 28 69 29 3c 30  20 8c 20 79 28 69 29 3d  |. y(i)<0 . y(i)=|
00000240  31 30 32 33 0d 01 54 07  e6 20 37 0d 01 5e 16 c8  |1023..T.. 7..^..|
00000250  8f c8 90 78 28 69 29 2c  79 28 69 29 2c 73 69 7a  |...x(i),y(i),siz|
00000260  65 0d 01 68 16 c8 8f c8  90 68 28 69 29 2c 76 28  |e..h.....h(i),v(|
00000270  69 29 2c 73 69 7a 65 0d  01 72 0d c8 97 20 74 2c  |i),size..r... t,|
00000280  68 2c 6d 62 0d 01 7c 0c  e7 20 6d 62 3d 34 20 8c  |h,mb..|.. mb=4 .|
00000290  0d 01 86 5b 20 e7 20 78  28 69 29 3e 74 2d 68 73  |...[ . x(i)>t-hs|
000002a0  69 7a 65 20 80 20 78 28  69 29 3c 74 2b 68 73 69  |ize . x(i)<t+hsi|
000002b0  7a 65 20 80 20 79 28 69  29 3e 68 2d 68 73 69 7a  |ze . y(i)>h-hsiz|
000002c0  65 20 80 20 79 28 69 29  3c 68 2b 68 73 69 7a 65  |e . y(i)<h+hsize|
000002d0  20 8c 20 6b 28 69 29 3d  31 3a f2 73 70 6c 61 74  | . k(i)=1:.splat|
000002e0  28 78 28 69 29 2c 79 28  69 29 29 0d 01 90 12 20  |(x(i),y(i)).... |
000002f0  e6 20 31 31 35 20 3a c8  92 20 74 2c 68 0d 01 9a  |. 115 :.. t,h...|
00000300  05 cd 0d 01 a4 05 cd 0d  01 ae 07 ed 20 69 0d 01  |............ i..|
00000310  b8 0e fd 20 6b 69 6c 6c  65 64 3d 6e 0d 01 c2 0a  |... killed=n....|
00000320  c8 97 20 88 20 35 0d 01  cc 07 fd 20 30 0d 01 d6  |.. . 5..... 0...|
00000330  05 e0 0d 01 e0 05 3a 0d  01 ea 11 dd 20 f2 73 70  |......:..... .sp|
00000340  6c 61 74 28 67 2c 65 29  0d 01 f4 0c e6 20 b3 28  |lat(g,e)..... .(|
00000350  32 35 35 29 0d 01 fe 0c  73 3d 33 2b b3 28 34 29  |255)....s=3+.(4)|
00000360  0d 02 08 0d e3 20 77 3d  31 20 b8 20 73 0d 02 12  |..... w=1 . s...|
00000370  16 61 28 77 29 3d 77 2a  33 36 30 2f 73 2b b3 28  |.a(w)=w*360/s+.(|
00000380  33 30 29 0d 02 1c 0e 62  28 77 29 3d 31 38 30 2f  |30)....b(w)=180/|
00000390  73 0d 02 26 12 73 28 77  29 3d 2d b3 28 31 29 2a  |s..&.s(w)=-.(1)*|
000003a0  35 2d 32 0d 02 30 05 ed  0d 02 3a 0f e3 64 3d 39  |5-2..0....:..d=9|
000003b0  b8 33 30 30 88 32 32 0d  02 44 0a e3 77 3d 31 b8  |.300.22..D..w=1.|
000003c0  73 0d 02 4e 23 c8 8f c8  90 20 67 2b 64 2a 9b b2  |s..N#.... g+d*..|
000003d0  61 28 77 29 2c 65 2b 64  2a b5 b2 61 28 77 29 2c  |a(w),e+d*..a(w),|
000003e0  62 28 77 29 0d 02 58 17  62 28 77 29 2b 3d 73 28  |b(w)..X.b(w)+=s(|
000003f0  77 29 3a 73 28 77 29 2b  3d 2e 33 0d 02 62 05 ed  |w):s(w)+=.3..b..|
00000400  0d 02 6c 05 ed 0d 02 76  05 e1 0d ff              |..l....v....|
0000040c