Home » Personal collection » Commodore disks » disk50a2_progs1.d64 » mandlebrot

mandlebrot

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 » Commodore disks » disk50a2_progs1.d64
Filename: mandlebrot
Read OK:
File size: 0479 bytes
Load address: 0801
Exec address: 0000
File contents
    40 S=16:B=3:C=8:SM=1024:XM=-.75:YM=-1.5:MX=2.25:MY=1.5:POKE53281,2
    42 XM=-2:MX=2:YM=-2:MY=2
    45 POKE53272,(PEEK(53272) AND 15) OR S
    50 POKE56578,PEEK(56578) OR 3
    55 POKE56576,(PEEK(56576) AND 252) ORB
    60 X=C*1024:H=INT(X/256):L=X-256*H
    65 POKE51,L:POKE52,H:FORX=55296TO56295:POKEX,0:NEXT
    70 POKE55,L:POKE56,H:POKE53285,0
    75 POKE53272,(PEEK(53272) AND 241) ORC
    80 POKE53265,PEEK(53265) OR 32
    82 POKE53270,PEEK(53270) OR 16
    85 FOR J=SM TO SM+999
    90 POKEJ,126
    95 NEXT:A=0:GOTO1050
   100 FOR J=X TO X+7999
   105 POKE J,0
   110 NEXT
   115 FORR=16TO0STEP-1:FORC=0TO319STEP2:CL=0:XB=XM+C*((MX-XM)/319)
   117 YB=YM+R*((MY-YM)/199):U=XB:V=YB:GOTO 125
   120 Y=U^2-V^2+XB:Z=2*U*V+YB:U=Y:V=Z
   125 IF U^2+V^2>4 THEN 135
   130 CL=CL+1:IFCL<=22THEN120
   135 POKE24577,CL:GOSUB1020:POKE24576,R:NEXT:NEXT
   175 GETK$:IFK$<>" "THEN175
   180 POKE53265,PEEK(53265) AND 223
   185 POKE53272,(PEEK(53272) AND 240) OR4
   190 STOP
  1000 BYTE=X+7687-320*INT(R/8)-(RAND7)+INT(C/8)*8
  1005 BIT=7-(CAND7)
  1010 POKE BYTE,PEEK(BYTE) OR 2^BIT
  1015 RETURN
  1020 REMCB=INT(CL/4)
  1022 REMIFCB=0THENCL=2
  1025 REMIFCB=1THENCL=0
  1027 REMIFCB=2THENCL=3
  1028 REMIFCB=3THENCL=1
  1030 IF (CL AND 2)=2 THEN GOSUB1000
  1035 C=C+1:IF (CL AND 1)=1 THEN GOSUB1000
  1040 C=C-1:RETURN
  1050 POKE820,(A AND 3):POKE821,((A+1) AND 3):POKE822,((A+2) AND 3)
  1060 POKE823,((A+3) AND 3):SYS49152
  1070 A=A+1:FORR=0TOPEEK(824):NEXT:GOTO 1050
  9876 FORJ=8*1024 TO 8*1024+7999:POKEJ,INT(RND(1)*255):NEXT

B(S�16:B�3:C�8:SM�1024:XM��.75:YM��1.5:MX�2.25:MY�1.5:�53281,2\*XM��2:MX�2:YM��2:MY�2{-�53272,(�(53272) � 15) � S�2�56578,�(56578) � 3�7�56576,(�(56576) � 252) �B�<X�C�1024:H��(X�256):L�X�256�H�A�51,L:�52,H:�X�55296�56295:�X,0:�	F�55,L:�56,H:�53285,02	K�53272,(�(53272) � 241) �CK	P�53265,�(53265) � 32d	R�53270,�(53270) � 16x	U� J�SM � SM�999�	Z�J,126�	_�:A�0:�1050�	d� J�X � X�7999�	i� J,0�	n��	s�R�16�0��1:�C�0�319�2:CL�0:XB�XM�C�((MX�XM)�319)
uYB�YM�R�((MY�YM)�199):U�XB:V�YB:� 1259
xY�U�2�V�2�XB:Z�2�U�V�YB:U�Y:V�ZO
}� U�2�V�2�4 � 135g
�CL�CL�1:�CL��22�120�
��24577,CL:�1020:�24576,R:�:��
��K$:�K$��" "�175�
��53265,�(53265) � 223�
��53272,(�(53272) � 240) �4�
���BYTE�X�7687�320��(R�8)�(R�7)��(C�8)�8�BIT�7�(C�7)1�� BYTE,�(BYTE) � 2�BIT7��I��CB=INT(CL/4)]��IFCB=0THENCL=2q�IFCB=1THENCL=0��IFCB=2THENCL=3��IFCB=3THENCL=1�� (CL � 2)�2 � �1000�C�C�1:� (CL � 1)�1 � �1000�C�C�1:��820,(A � 3):�821,((A�1) � 3):�822,((A�2) � 3),$�823,((A�3) � 3):�49152K.A�A�1:�R�0��(824):�:� 1050x�&�J�8�1024 � 8�1024�7999:�J,�(�(1)�255):�
bH(@s.16:b.3:c.8:sm.1024:xm...75:ym..1.5:mx.2.25:my.1.5:.53281,2@£H*@xm..2:mx.2:ym..2:my.2@.H-@.53272,(.(53272) . 15) . s@.H2@.56578,.(56578) . 3@.H7@.56576,(.(56576) . 252) .b@.H<@x.c.1024:h..(x.256):l.x.256.h@.Ha@.51,l:.52,h:.x.55296.56295:.x,0:.@SIf@.55,l:.56,h:.53285,0@2Ik@.53272,(.(53272) . 241) .c@kIp@.53265,.(53265) . 32@DIr@.53270,.(53270) . 16@XIu@. j.sm . sm.999@.Iz@.j,126@.I.@.:a.0:.1050@.ID@. j.x . x.7999@.II@. j,0@.IN@.@.IS@.r.16.0..1:.c.0.319.2:cl.0:xb.xm.c.((mx.xm).319)@UJU@yb.ym.r.((my.ym).199):u.xb:v.yb:. 125@9JX@y.u.2.v.2.xb:z.2.u.v.yb:u.y:v.z@oJ.@. u.2.v.2.4 . 135@GJ.@cl.cl.1:.cl..22.120@.J.@.24577,cl:.1020:.24576,r:.:.@.J.@.k$:.k$.." ".175@.J.@.53265,.(53265) . 223@.J.@.53272,(.(53272) . 240) .4@.J.@.@FK.Cbyte.x.7687.320..(r.8).(r.7)..(c.8).8@VK.Cbit.7.(c.7)@1K.C. byte,.(byte) . 2.bit@7K.C.@iK.C.cb=int(cl/4)@]K.C.ifcb=0thencl=2@QKAD.ifcb=1thencl=0@.KCD.ifcb=2thencl=3@.KDD.ifcb=3thencl=1@.KFD. (cl . 2).2 . .1000@.KKDc.c.1:. (cl . 1).1 . .1000@.KPDc.c.1:.@PLZD.820,(a . 3):.821,((a.1) . 3):.822,((a.2) . 3)@,L$D.823,((a.3) . 3):.49152@kL.Da.a.1:.r.0..(824):.:. 1050@XL.&.j.8.1024 . 8.1024.7999:.j,.(.(1).255):.@@@
00000000  42 08 28 00 53 b2 31 36  3a 42 b2 33 3a 43 b2 38  |B.(.S.16:B.3:C.8|
00000010  3a 53 4d b2 31 30 32 34  3a 58 4d b2 ab 2e 37 35  |:SM.1024:XM...75|
00000020  3a 59 4d b2 ab 31 2e 35  3a 4d 58 b2 32 2e 32 35  |:YM..1.5:MX.2.25|
00000030  3a 4d 59 b2 31 2e 35 3a  97 35 33 32 38 31 2c 32  |:MY.1.5:.53281,2|
00000040  00 5c 08 2a 00 58 4d b2  ab 32 3a 4d 58 b2 32 3a  |.\.*.XM..2:MX.2:|
00000050  59 4d b2 ab 32 3a 4d 59  b2 32 00 7b 08 2d 00 97  |YM..2:MY.2.{.-..|
00000060  35 33 32 37 32 2c 28 c2  28 35 33 32 37 32 29 20  |53272,(.(53272) |
00000070  af 20 31 35 29 20 b0 20  53 00 93 08 32 00 97 35  |. 15) . S...2..5|
00000080  36 35 37 38 2c c2 28 35  36 35 37 38 29 20 b0 20  |6578,.(56578) . |
00000090  33 00 b2 08 37 00 97 35  36 35 37 36 2c 28 c2 28  |3...7..56576,(.(|
000000a0  35 36 35 37 36 29 20 af  20 32 35 32 29 20 b0 42  |56576) . 252) .B|
000000b0  00 d4 08 3c 00 58 b2 43  ac 31 30 32 34 3a 48 b2  |...<.X.C.1024:H.|
000000c0  b5 28 58 ad 32 35 36 29  3a 4c b2 58 ab 32 35 36  |.(X.256):L.X.256|
000000d0  ac 48 00 fa 08 41 00 97  35 31 2c 4c 3a 97 35 32  |.H...A..51,L:.52|
000000e0  2c 48 3a 81 58 b2 35 35  32 39 36 a4 35 36 32 39  |,H:.X.55296.5629|
000000f0  35 3a 97 58 2c 30 3a 82  00 13 09 46 00 97 35 35  |5:.X,0:....F..55|
00000100  2c 4c 3a 97 35 36 2c 48  3a 97 35 33 32 38 35 2c  |,L:.56,H:.53285,|
00000110  30 00 32 09 4b 00 97 35  33 32 37 32 2c 28 c2 28  |0.2.K..53272,(.(|
00000120  35 33 32 37 32 29 20 af  20 32 34 31 29 20 b0 43  |53272) . 241) .C|
00000130  00 4b 09 50 00 97 35 33  32 36 35 2c c2 28 35 33  |.K.P..53265,.(53|
00000140  32 36 35 29 20 b0 20 33  32 00 64 09 52 00 97 35  |265) . 32.d.R..5|
00000150  33 32 37 30 2c c2 28 35  33 32 37 30 29 20 b0 20  |3270,.(53270) . |
00000160  31 36 00 78 09 55 00 81  20 4a b2 53 4d 20 a4 20  |16.x.U.. J.SM . |
00000170  53 4d aa 39 39 39 00 83  09 5a 00 97 4a 2c 31 32  |SM.999...Z..J,12|
00000180  36 00 93 09 5f 00 82 3a  41 b2 30 3a 89 31 30 35  |6..._..:A.0:.105|
00000190  30 00 a6 09 64 00 81 20  4a b2 58 20 a4 20 58 aa  |0...d.. J.X . X.|
000001a0  37 39 39 39 00 b0 09 69  00 97 20 4a 2c 30 00 b6  |7999...i.. J,0..|
000001b0  09 6e 00 82 00 eb 09 73  00 81 52 b2 31 36 a4 30  |.n.....s..R.16.0|
000001c0  a9 ab 31 3a 81 43 b2 30  a4 33 31 39 a9 32 3a 43  |..1:.C.0.319.2:C|
000001d0  4c b2 30 3a 58 42 b2 58  4d aa 43 ac 28 28 4d 58  |L.0:XB.XM.C.((MX|
000001e0  ab 58 4d 29 ad 33 31 39  29 00 15 0a 75 00 59 42  |.XM).319)...u.YB|
000001f0  b2 59 4d aa 52 ac 28 28  4d 59 ab 59 4d 29 ad 31  |.YM.R.((MY.YM).1|
00000200  39 39 29 3a 55 b2 58 42  3a 56 b2 59 42 3a 89 20  |99):U.XB:V.YB:. |
00000210  31 32 35 00 39 0a 78 00  59 b2 55 ae 32 ab 56 ae  |125.9.x.Y.U.2.V.|
00000220  32 aa 58 42 3a 5a b2 32  ac 55 ac 56 aa 59 42 3a  |2.XB:Z.2.U.V.YB:|
00000230  55 b2 59 3a 56 b2 5a 00  4f 0a 7d 00 8b 20 55 ae  |U.Y:V.Z.O.}.. U.|
00000240  32 aa 56 ae 32 b1 34 20  a7 20 31 33 35 00 67 0a  |2.V.2.4 . 135.g.|
00000250  82 00 43 4c b2 43 4c aa  31 3a 8b 43 4c b3 b2 32  |..CL.CL.1:.CL..2|
00000260  32 a7 31 32 30 00 88 0a  87 00 97 32 34 35 37 37  |2.120......24577|
00000270  2c 43 4c 3a 8d 31 30 32  30 3a 97 32 34 35 37 36  |,CL:.1020:.24576|
00000280  2c 52 3a 82 3a 82 00 9d  0a af 00 a1 4b 24 3a 8b  |,R:.:.......K$:.|
00000290  4b 24 b3 b1 22 20 22 a7  31 37 35 00 b7 0a b4 00  |K$.." ".175.....|
000002a0  97 35 33 32 36 35 2c c2  28 35 33 32 36 35 29 20  |.53265,.(53265) |
000002b0  af 20 32 32 33 00 d6 0a  b9 00 97 35 33 32 37 32  |. 223......53272|
000002c0  2c 28 c2 28 35 33 32 37  32 29 20 af 20 32 34 30  |,(.(53272) . 240|
000002d0  29 20 b0 34 00 dc 0a be  00 90 00 06 0b e8 03 42  |) .4...........B|
000002e0  59 54 45 b2 58 aa 37 36  38 37 ab 33 32 30 ac b5  |YTE.X.7687.320..|
000002f0  28 52 ad 38 29 ab 28 52  af 37 29 aa b5 28 43 ad  |(R.8).(R.7)..(C.|
00000300  38 29 ac 38 00 16 0b ed  03 42 49 54 b2 37 ab 28  |8).8.....BIT.7.(|
00000310  43 af 37 29 00 31 0b f2  03 97 20 42 59 54 45 2c  |C.7).1.... BYTE,|
00000320  c2 28 42 59 54 45 29 20  b0 20 32 ae 42 49 54 00  |.(BYTE) . 2.BIT.|
00000330  37 0b f7 03 8e 00 49 0b  fc 03 8f 43 42 3d 49 4e  |7.....I....CB=IN|
00000340  54 28 43 4c 2f 34 29 00  5d 0b fe 03 8f 49 46 43  |T(CL/4).]....IFC|
00000350  42 3d 30 54 48 45 4e 43  4c 3d 32 00 71 0b 01 04  |B=0THENCL=2.q...|
00000360  8f 49 46 43 42 3d 31 54  48 45 4e 43 4c 3d 30 00  |.IFCB=1THENCL=0.|
00000370  85 0b 03 04 8f 49 46 43  42 3d 32 54 48 45 4e 43  |.....IFCB=2THENC|
00000380  4c 3d 33 00 99 0b 04 04  8f 49 46 43 42 3d 33 54  |L=3......IFCB=3T|
00000390  48 45 4e 43 4c 3d 31 00  b2 0b 06 04 8b 20 28 43  |HENCL=1...... (C|
000003a0  4c 20 af 20 32 29 b2 32  20 a7 20 8d 31 30 30 30  |L . 2).2 . .1000|
000003b0  00 d1 0b 0b 04 43 b2 43  aa 31 3a 8b 20 28 43 4c  |.....C.C.1:. (CL|
000003c0  20 af 20 31 29 b2 31 20  a7 20 8d 31 30 30 30 00  | . 1).1 . .1000.|
000003d0  dd 0b 10 04 43 b2 43 ab  31 3a 8e 00 10 0c 1a 04  |....C.C.1:......|
000003e0  97 38 32 30 2c 28 41 20  af 20 33 29 3a 97 38 32  |.820,(A . 3):.82|
000003f0  31 2c 28 28 41 aa 31 29  20 af 20 33 29 3a 97 38  |1,((A.1) . 3):.8|
00000400  32 32 2c 28 28 41 aa 32  29 20 af 20 33 29 00 2c  |22,((A.2) . 3).,|
00000410  0c 24 04 97 38 32 33 2c  28 28 41 aa 33 29 20 af  |.$..823,((A.3) .|
00000420  20 33 29 3a 9e 34 39 31  35 32 00 4b 0c 2e 04 41  | 3):.49152.K...A|
00000430  b2 41 aa 31 3a 81 52 b2  30 a4 c2 28 38 32 34 29  |.A.1:.R.0..(824)|
00000440  3a 82 3a 89 20 31 30 35  30 00 78 0c 94 26 81 4a  |:.:. 1050.x..&.J|
00000450  b2 38 ac 31 30 32 34 20  a4 20 38 ac 31 30 32 34  |.8.1024 . 8.1024|
00000460  aa 37 39 39 39 3a 97 4a  2c b5 28 bb 28 31 29 ac  |.7999:.J,.(.(1).|
00000470  32 35 35 29 3a 82 00 00  00                       |255):....|
00000479