Home » Personal collection » Acorn hard disk » files » !CHAOS » !RunImage

!RunImage

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 » files » !CHAOS
Filename: !RunImage
Read OK:
File size: 0342 bytes
Load address: 0000
Exec address: 0000
File contents
   10ON ERROR REPORT:PRINT" @ ";ERL:END
   20MODE0:GCOL3,1:unplot=FALSE
   30DIMx(4),y(4),xo(4),yo(4),nxo(4),nyo(4),xv(4),yv(4)
   40*SLOAD <Obey$Dir>.!Sprites
   50*SCHOOSE BALL
   60l=200:mass=1:x(0)=400:y(0)=1000-l:xv(0)=0:yv(0)=0
   70x(1)=300:y(1)=1000-l-l:xv(1)=0:yv(1)=0
   80REPEAT:T=TIME
   90 PROCmech(1,x(0),y(0),0,0)
  100 ef=20*(SQR((x(1)-x(0))^2+(y(1)-y(0))^2)-l)/l:ang=ATN((x(1)-x(0))/(y(1)-y(0)))
  110 PROCmech(0,500,1000,ef*SIN(ang),ef*COS(ang)-mass)
  120 REPEAT UNTIL TIME>(T+10):unplot=TRUE
  130UNTIL FALSE
  140:
  150DEFPROCmech(n,nx,ny,xe,ye)
  160 ef=20*(SQR((x(n)-nx)^2+(y(n)-ny)^2)-l)/l:ang=ATN((nx-x(n))/(ny-y(n)))
  170 IF (ny-y(n))<0 THEN ef=-ef
  180 ya=-mass+ef*COS(ang)+ye:xa=ef*SIN(ang)+xe
  190 yv(n)=yv(n)+ya/10:xv(n)=xv(n)+xa/10:y(n)=y(n)+yv(n):x(n)=x(n)+xv(n)
  200 PLOT &ED,x(n)-8,y(n)-16:MOVEx(n),y(n):DRAWnx,ny
  210 IF unplot THEN PLOT&ED,xo(n)-8,yo(n)-16:MOVExo(n),yo(n):DRAWnxo(n),nyo(n)
  220 xo(n)=x(n):yo(n)=y(n):nxo(n)=nx:nyo(n)=ny
  230ENDPROC
  240

� � �:�" @ ";�:�
�0:�3,1:unplot=�
4�x(4),y(4),xo(4),yo(4),nxo(4),nyo(4),xv(4),yv(4)
(*SLOAD <Obey$Dir>.!Sprites
2*SCHOOSE BALL
<5l=200:mass=1:x(0)=400:y(0)=1000-l:xv(0)=0:yv(0)=0
F*x(1)=300:y(1)=1000-l-l:xv(1)=0:yv(1)=0
P	�:T=�
Z �mech(1,x(0),y(0),0,0)
dN ef=20*(�((x(1)-x(0))^2+(y(1)-y(0))^2)-l)/l:ang=�((x(1)-x(0))/(y(1)-y(0)))
n/ �mech(0,500,1000,ef*�(ang),ef*�(ang)-mass)
x � � �>(T+10):unplot=�
�� �
�:
���mech(n,nx,ny,xe,ye)
�F ef=20*(�((x(n)-nx)^2+(y(n)-ny)^2)-l)/l:ang=�((nx-x(n))/(ny-y(n)))
� � (ny-y(n))<0 � ef=-ef
�* ya=-mass+ef*�(ang)+ye:xa=ef*�(ang)+xe
�H yv(n)=yv(n)+ya/10:xv(n)=xv(n)+xa/10:y(n)=y(n)+yv(n):x(n)=x(n)+xv(n)
�+ � &ED,x(n)-8,y(n)-16:�x(n),y(n):�nx,ny
�A � unplot � �&ED,xo(n)-8,yo(n)-16:�xo(n),yo(n):�nxo(n),nyo(n)
�. xo(n)=x(n):yo(n)=y(n):nxo(n)=nx:nyo(n)=ny
��
�
�
00000000  0d 00 0a 14 ee 20 85 20  f6 3a f1 22 20 40 20 22  |..... . .:." @ "|
00000010  3b 9e 3a e0 0d 00 14 14  eb 30 3a e6 33 2c 31 3a  |;.:......0:.3,1:|
00000020  75 6e 70 6c 6f 74 3d a3  0d 00 1e 34 de 78 28 34  |unplot=....4.x(4|
00000030  29 2c 79 28 34 29 2c 78  6f 28 34 29 2c 79 6f 28  |),y(4),xo(4),yo(|
00000040  34 29 2c 6e 78 6f 28 34  29 2c 6e 79 6f 28 34 29  |4),nxo(4),nyo(4)|
00000050  2c 78 76 28 34 29 2c 79  76 28 34 29 0d 00 28 1e  |,xv(4),yv(4)..(.|
00000060  2a 53 4c 4f 41 44 20 3c  4f 62 65 79 24 44 69 72  |*SLOAD <Obey$Dir|
00000070  3e 2e 21 53 70 72 69 74  65 73 0d 00 32 11 2a 53  |>.!Sprites..2.*S|
00000080  43 48 4f 4f 53 45 20 42  41 4c 4c 0d 00 3c 35 6c  |CHOOSE BALL..<5l|
00000090  3d 32 30 30 3a 6d 61 73  73 3d 31 3a 78 28 30 29  |=200:mass=1:x(0)|
000000a0  3d 34 30 30 3a 79 28 30  29 3d 31 30 30 30 2d 6c  |=400:y(0)=1000-l|
000000b0  3a 78 76 28 30 29 3d 30  3a 79 76 28 30 29 3d 30  |:xv(0)=0:yv(0)=0|
000000c0  0d 00 46 2a 78 28 31 29  3d 33 30 30 3a 79 28 31  |..F*x(1)=300:y(1|
000000d0  29 3d 31 30 30 30 2d 6c  2d 6c 3a 78 76 28 31 29  |)=1000-l-l:xv(1)|
000000e0  3d 30 3a 79 76 28 31 29  3d 30 0d 00 50 09 f5 3a  |=0:yv(1)=0..P..:|
000000f0  54 3d 91 0d 00 5a 1b 20  f2 6d 65 63 68 28 31 2c  |T=...Z. .mech(1,|
00000100  78 28 30 29 2c 79 28 30  29 2c 30 2c 30 29 0d 00  |x(0),y(0),0,0)..|
00000110  64 4e 20 65 66 3d 32 30  2a 28 b6 28 28 78 28 31  |dN ef=20*(.((x(1|
00000120  29 2d 78 28 30 29 29 5e  32 2b 28 79 28 31 29 2d  |)-x(0))^2+(y(1)-|
00000130  79 28 30 29 29 5e 32 29  2d 6c 29 2f 6c 3a 61 6e  |y(0))^2)-l)/l:an|
00000140  67 3d 99 28 28 78 28 31  29 2d 78 28 30 29 29 2f  |g=.((x(1)-x(0))/|
00000150  28 79 28 31 29 2d 79 28  30 29 29 29 0d 00 6e 2f  |(y(1)-y(0)))..n/|
00000160  20 f2 6d 65 63 68 28 30  2c 35 30 30 2c 31 30 30  | .mech(0,500,100|
00000170  30 2c 65 66 2a b5 28 61  6e 67 29 2c 65 66 2a 9b  |0,ef*.(ang),ef*.|
00000180  28 61 6e 67 29 2d 6d 61  73 73 29 0d 00 78 1a 20  |(ang)-mass)..x. |
00000190  f5 20 fd 20 91 3e 28 54  2b 31 30 29 3a 75 6e 70  |. . .>(T+10):unp|
000001a0  6c 6f 74 3d b9 0d 00 82  07 fd 20 a3 0d 00 8c 05  |lot=...... .....|
000001b0  3a 0d 00 96 19 dd f2 6d  65 63 68 28 6e 2c 6e 78  |:......mech(n,nx|
000001c0  2c 6e 79 2c 78 65 2c 79  65 29 0d 00 a0 46 20 65  |,ny,xe,ye)...F e|
000001d0  66 3d 32 30 2a 28 b6 28  28 78 28 6e 29 2d 6e 78  |f=20*(.((x(n)-nx|
000001e0  29 5e 32 2b 28 79 28 6e  29 2d 6e 79 29 5e 32 29  |)^2+(y(n)-ny)^2)|
000001f0  2d 6c 29 2f 6c 3a 61 6e  67 3d 99 28 28 6e 78 2d  |-l)/l:ang=.((nx-|
00000200  78 28 6e 29 29 2f 28 6e  79 2d 79 28 6e 29 29 29  |x(n))/(ny-y(n)))|
00000210  0d 00 aa 1b 20 e7 20 28  6e 79 2d 79 28 6e 29 29  |.... . (ny-y(n))|
00000220  3c 30 20 8c 20 65 66 3d  2d 65 66 0d 00 b4 2a 20  |<0 . ef=-ef...* |
00000230  79 61 3d 2d 6d 61 73 73  2b 65 66 2a 9b 28 61 6e  |ya=-mass+ef*.(an|
00000240  67 29 2b 79 65 3a 78 61  3d 65 66 2a b5 28 61 6e  |g)+ye:xa=ef*.(an|
00000250  67 29 2b 78 65 0d 00 be  48 20 79 76 28 6e 29 3d  |g)+xe...H yv(n)=|
00000260  79 76 28 6e 29 2b 79 61  2f 31 30 3a 78 76 28 6e  |yv(n)+ya/10:xv(n|
00000270  29 3d 78 76 28 6e 29 2b  78 61 2f 31 30 3a 79 28  |)=xv(n)+xa/10:y(|
00000280  6e 29 3d 79 28 6e 29 2b  79 76 28 6e 29 3a 78 28  |n)=y(n)+yv(n):x(|
00000290  6e 29 3d 78 28 6e 29 2b  78 76 28 6e 29 0d 00 c8  |n)=x(n)+xv(n)...|
000002a0  2b 20 f0 20 26 45 44 2c  78 28 6e 29 2d 38 2c 79  |+ . &ED,x(n)-8,y|
000002b0  28 6e 29 2d 31 36 3a ec  78 28 6e 29 2c 79 28 6e  |(n)-16:.x(n),y(n|
000002c0  29 3a df 6e 78 2c 6e 79  0d 00 d2 41 20 e7 20 75  |):.nx,ny...A . u|
000002d0  6e 70 6c 6f 74 20 8c 20  f0 26 45 44 2c 78 6f 28  |nplot . .&ED,xo(|
000002e0  6e 29 2d 38 2c 79 6f 28  6e 29 2d 31 36 3a ec 78  |n)-8,yo(n)-16:.x|
000002f0  6f 28 6e 29 2c 79 6f 28  6e 29 3a df 6e 78 6f 28  |o(n),yo(n):.nxo(|
00000300  6e 29 2c 6e 79 6f 28 6e  29 0d 00 dc 2e 20 78 6f  |n),nyo(n).... xo|
00000310  28 6e 29 3d 78 28 6e 29  3a 79 6f 28 6e 29 3d 79  |(n)=x(n):yo(n)=y|
00000320  28 6e 29 3a 6e 78 6f 28  6e 29 3d 6e 78 3a 6e 79  |(n):nxo(n)=nx:ny|
00000330  6f 28 6e 29 3d 6e 79 0d  00 e6 05 e1 0d 00 f0 04  |o(n)=ny.........|
00000340  0d ff                                             |..|
00000342