Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199611.adf » Regulars » StarInfo/Turnbull/Julia2

StarInfo/Turnbull/Julia2

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 » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199611.adf » Regulars
Filename: StarInfo/Turnbull/Julia2
Read OK:
File size: 0CD7 bytes
Load address: 0000
Exec address: 0000
File contents
   10LIBRARY"BasicLib:MiscMacros"
   20MODE13
   30PROCconstants
   40DIMspace%spacelen%:P%=space%
   50code%=P%:P%+=codelen%
   60grid%=P%:P%+=4*256*128
   70IFP%>space%+spacelen%THENERROR255,"Space isn't big enough"
   80PROCassemble
   90COLOUR191TINT192:CLS:COLOUR128TINT0
  100MC%=1+AC%+AC%-9
  110REPEAT
  120MOUSEX%,Y%,Z%
  130!cx%=X%-640<<MC%:!cy%=Y%-512<<MC%
  140CALLjulia%
  150UNTILZ%>0
  160END
  170:
  180:
  190DEFPROCconstants
  200spacelen%=&80000
  210codelen%=&4000
  220AC%=14:PC%=AC%+2-8
  230DIMiskip%(12),diskip%(12)
  240ENDPROC
  250:
  260DEFPROCassemble
  270FORT%=0TO2STEP2:P%=code%
  280[OPT T%
  290:
  300.test%
  310EQUD -1:EQUD -1:EQUD -1:EQUD -1
  320EQUD -1:EQUD -1:EQUD -1:EQUD -1
  330EQUD -1:EQUD -1:EQUD -1:EQUD -1
  340EQUD -1:EQUD -1:EQUD -1:EQUD -1
  350:
  360.vduvars%:EQUD 148:EQUD -1
  370.scraddr%:EQUD -1
  380:
  390.cx%:EQUD 0
  400.cy%:EQUD 0
  410:
  420.julia%
  430STMFD R13!,{R0-R12,R14}
  440ADR R0,vduvars%
  450ADR R1,scraddr%
  460SWI "OS_ReadVduVariables"
  470ADR R0,cx%
  480LDMIA R0,{R0-R1}
  490MOV R2,#0
  500MOV R3,#0
  510; Move left and up 127.5
  520SUB R0,R0,R2,ASL#1+PC%+7:SUB R1,R1,R3,ASL#1+PC%+7
  530ADD R0,R0,#1<<2*(PC%+7)
  540SUB R2,R2,#1<<PC%+7
  550ADD R1,R1,R2,ASL#1+PC%+7:SUB R0,R0,R3,ASL#1+PC%+7
  560SUB R0,R0,#1<<2*(PC%+7)
  570ADD R3,R3,#1<<PC%+7
  580ADD R0,R0,R2,ASL#1+PC%-1:ADD R1,R1,R3,ASL#1+PC%-1
  590ADD R0,R0,#1<<2*(PC%-1)
  600ADD R2,R2,#1<<PC%-1
  610SUB R1,R1,R2,ASL#1+PC%-1:ADD R0,R0,R3,ASL#1+PC%-1
  620SUB R0,R0,#1<<2*(PC%-1)
  630SUB R3,R3,#1<<PC%-1
  640OPT FNadr(12,grid%,2)
  650ADD R10,R12,#4*256*128
  660MOV R11,#128
  670.yloop%
  680ADD R2,R2,#1<<PC%-1
  690SUB R11,R11,#256<<16
  700.xloop%
  710; Work out target address
  720MVN R6,#NOT-1
  730MOV R4,R0,ASR#2+2*AC%-8
  740RSBS R4,R4,#127
  750RSBGES R4,R4,#255
  760BLT skipx%
  770MVN R5,R1,ASR#2+2*AC%-8
  780ADDS R5,R4,R5,ASL#8
  790MVNGE R5,R5
  800CMN R5,#128*256
  810ADDGE R6,R10,R5,ASL#2
  820.skipx%
  830STR R6,[R12],#4
  840; Move right 1
  850ADD R0,R0,R2,ASL#1+PC%:ADD R1,R1,R3,ASL#1+PC%
  860ADD R2,R2,#1<<PC%
  870ADDS R11,R11,#1<<16
  880BLE xloop%
  890SUB R2,R2,#1<<PC%-1
  900; Move left 256 and down 1
  910SUB R0,R0,R2,ASL#1+PC%+8:SUB R1,R1,R3,ASL#1+PC%+8
  920ADD R0,R0,#1<<2*(PC%+8)
  930SUB R2,R2,#1<<PC%+8
  940SUB R1,R1,R2,ASL#1+PC%:ADD R0,R0,R3,ASL#1+PC%
  950SUB R0,R0,#1<<2*PC%
  960SUB R3,R3,#1<<PC%
  970SUBS R11,R11,#1
  980BGT yloop%
  990; Incest
 1000OPT FNadr(3,grid%,2)
 1010LDR R0,scraddr%
 1020ADD R0,R0,#320-256>>1
 1030ADD R1,R0,#320*256
 1040MOV R2,#128
 1050.yloop%
 1060SUB R1,R1,#320-256
 1070SUB R2,R2,#256<<16
 1080.xloop%
 1090\SWI &11E
 1100]:FORU%=4TO12:[OPT T%
 1110LDR R12,[(U%-1)]
 1120SUBS U%,R12,#0
 1130BLE iskip%(U%)
 1140]:NEXT:[OPT T%
 1150BL deepincest%
 1160CMP R12,#0
 1170]:FORU%=12TO4STEP-1:[OPT T%
 1180SUBLT R12,R12,#1
 1190STR R12,[(U%-1)]
 1200.iskip%(U%)
 1210]:NEXT:[OPT T%
 1220STRB R12,[R0],#1
 1230STRB R12,[R1,#-1]!
 1240ADD R3,R3,#4
 1250ADDS R2,R2,#1<<16
 1260BLE xloop%
 1270ADD R0,R0,#320-256
 1280SUBS R2,R2,#1
 1290BGT yloop%
 1300\SWI &10A
 1310LDMFD R13!,{R0-R12,PC}^
 1320:
 1330; R12 is address of pixel to search
 1340; All relevant pixels updated
 1350; Colour returned in R12
 1360:
 1370.deepincest%
 1380STMFD R13!,{R0-R11,R14}
 1390MOV R0,R12
 1400MOV R14,#0
 1410]:FORU%=1TO12:[OPT T%
 1420\SWI &160+U%
 1430LDR R12,[(U%-1)]
 1440SUBS U%,R12,#0
 1450BLE diskip%(U%)
 1460STR R14,[(U%-1)]
 1470]:NEXT:[OPT T%
 1480BL deepincest%
 1490CMP R12,#0
 1500]:FORU%=12TO1STEP-1:[OPT T%
 1510SUBLT R12,R12,#1
 1520STR R12,[(U%-1)]
 1530.diskip%(U%)
 1540]:NEXT:[OPT T%
 1550LDMFD R13!,{R0-R11,PC}^
 1560:
 1570]:IFP%>code%+codelen%THENERROR255,"Code isn't big enough"
 1580NEXT
 1590ENDPROC

ț"BasicLib:MiscMacros"
�13
�constants
(�space%spacelen%:P%=space%
2code%=P%:P%+=codelen%
<grid%=P%:P%+=4*256*128
F6�P%>space%+spacelen%��255,"Space isn't big enough"
P
�assemble
Z�191Ȝ192:�:�128Ȝ0
dMC%=1+AC%+AC%-9
n�
xȗX%,Y%,Z%
�%!cx%=X%-640<<MC%:!cy%=Y%-512<<MC%
��julia%
�	�Z%>0
��
�:
�:
���constants
�spacelen%=&80000
�codelen%=&4000
�AC%=14:PC%=AC%+2-8
��iskip%(12),diskip%(12)
��
�:
��assemble
�T%=0�2�2:P%=code%
[OPT T%
":
,
.test%
6#EQUD -1:EQUD -1:EQUD -1:EQUD -1
@#EQUD -1:EQUD -1:EQUD -1:EQUD -1
J#EQUD -1:EQUD -1:EQUD -1:EQUD -1
T#EQUD -1:EQUD -1:EQUD -1:EQUD -1
^:
h.vduvars%:EQUD 148:EQUD -1
r.scraddr%:EQUD -1
|:
�.cx%:EQUD 0
�.cy%:EQUD 0
�:
�.julia%
�STMFD R13!,{R0-R12,R14}
�ADR R0,vduvars%
�ADR R1,scraddr%
�SWI "OS_ReadVduVariables"
�ADR R0,cx%
�LDMIA R0,{R0-R1}
�
MOV R2,#0
�
MOV R3,#0
�; Move left and up 127.5
5SUB R0,R0,R2,ASL#1+PC%+7:SUB R1,R1,R3,ASL#1+PC%+7
ADD R0,R0,#1<<2*(PC%+7)
SUB R2,R2,#1<<PC%+7
&5ADD R1,R1,R2,ASL#1+PC%+7:SUB R0,R0,R3,ASL#1+PC%+7
0SUB R0,R0,#1<<2*(PC%+7)
:ADD R3,R3,#1<<PC%+7
D5ADD R0,R0,R2,ASL#1+PC%-1:ADD R1,R1,R3,ASL#1+PC%-1
NADD R0,R0,#1<<2*(PC%-1)
XADD R2,R2,#1<<PC%-1
b5SUB R1,R1,R2,ASL#1+PC%-1:ADD R0,R0,R3,ASL#1+PC%-1
lSUB R0,R0,#1<<2*(PC%-1)
vSUB R3,R3,#1<<PC%-1
�OPT �adr(12,grid%,2)
�ADD R10,R12,#4*256*128
�MOV R11,#128
�.yloop%
�ADD R2,R2,#1<<PC%-1
�SUB R11,R11,#256<<16
�.xloop%
�; Work out target address
�MVN R6,#�-1
�MOV R4,R0,ASR#2+2*AC%-8
�RSBS R4,R4,#127
�RSBGES R4,R4,#255
�BLT skipx%
MVN R5,R1,ASR#2+2*AC%-8
ADDS R5,R4,R5,ASL#8
MVNGE R5,R5
 CMN R5,#128*256
*ADDGE R6,R10,R5,ASL#2
4.skipx%
>STR R6,[R12],#4
H; Move right 1
R1ADD R0,R0,R2,ASL#1+PC%:ADD R1,R1,R3,ASL#1+PC%
\ADD R2,R2,#1<<PC%
fADDS R11,R11,#1<<16
pBLE xloop%
zSUB R2,R2,#1<<PC%-1
�; Move left 256 and down 1
�5SUB R0,R0,R2,ASL#1+PC%+8:SUB R1,R1,R3,ASL#1+PC%+8
�ADD R0,R0,#1<<2*(PC%+8)
�SUB R2,R2,#1<<PC%+8
�1SUB R1,R1,R2,ASL#1+PC%:ADD R0,R0,R3,ASL#1+PC%
�SUB R0,R0,#1<<2*PC%
�SUB R3,R3,#1<<PC%
�SUBS R11,R11,#1
�BGT yloop%
�; Incest
�OPT �adr(3,grid%,2)
�LDR R0,scraddr%
�ADD R0,R0,#320-256>>1
ADD R1,R0,#320*256
MOV R2,#128
.yloop%
$SUB R1,R1,#320-256
.SUB R2,R2,#256<<16
8.xloop%
B
\SWI &11E
L]:�U%=4�12:[OPT T%
VLDR R12,[(U%-1)]
`SUBS U%,R12,#0
jBLE iskip%(U%)
t]:�:[OPT T%
~BL deepincest%
�CMP R12,#0
�]:�U%=12�4�-1:[OPT T%
�SUBLT R12,R12,#1
�STR R12,[(U%-1)]
�.iskip%(U%)
�]:�:[OPT T%
�STRB R12,[R0],#1
�STRB R12,[R1,#-1]!
�ADD R3,R3,#4
�ADDS R2,R2,#1<<16
�BLE xloop%
�ADD R0,R0,#320-256
SUBS R2,R2,#1

BGT yloop%

\SWI &10A
LDMFD R13!,{R0-R12,PC}^
(:
2'; R12 is address of pixel to search
<!; All relevant pixels updated
F; Colour returned in R12
P:
Z.deepincest%
dSTMFD R13!,{R0-R11,R14}
nMOV R0,R12
xMOV R14,#0
�]:�U%=1�12:[OPT T%
�\SWI &160+U%
�LDR R12,[(U%-1)]
�SUBS U%,R12,#0
�BLE diskip%(U%)
�STR R14,[(U%-1)]
�]:�:[OPT T%
�BL deepincest%
�CMP R12,#0
�]:�U%=12�1�-1:[OPT T%
�SUBLT R12,R12,#1
�STR R12,[(U%-1)]
�.diskip%(U%)
]:�:[OPT T%
LDMFD R13!,{R0-R11,PC}^
:
"5]:�P%>code%+codelen%��255,"Code isn't big enough"
,�
6�
�
00000000  0d 00 0a 1b c8 9b 22 42  61 73 69 63 4c 69 62 3a  |......"BasicLib:|
00000010  4d 69 73 63 4d 61 63 72  6f 73 22 0d 00 14 07 eb  |MiscMacros".....|
00000020  31 33 0d 00 1e 0e f2 63  6f 6e 73 74 61 6e 74 73  |13.....constants|
00000030  0d 00 28 1e de 73 70 61  63 65 25 73 70 61 63 65  |..(..space%space|
00000040  6c 65 6e 25 3a 50 25 3d  73 70 61 63 65 25 0d 00  |len%:P%=space%..|
00000050  32 19 63 6f 64 65 25 3d  50 25 3a 50 25 2b 3d 63  |2.code%=P%:P%+=c|
00000060  6f 64 65 6c 65 6e 25 0d  00 3c 1a 67 72 69 64 25  |odelen%..<.grid%|
00000070  3d 50 25 3a 50 25 2b 3d  34 2a 32 35 36 2a 31 32  |=P%:P%+=4*256*12|
00000080  38 0d 00 46 36 e7 50 25  3e 73 70 61 63 65 25 2b  |8..F6.P%>space%+|
00000090  73 70 61 63 65 6c 65 6e  25 8c 85 32 35 35 2c 22  |spacelen%..255,"|
000000a0  53 70 61 63 65 20 69 73  6e 27 74 20 62 69 67 20  |Space isn't big |
000000b0  65 6e 6f 75 67 68 22 0d  00 50 0d f2 61 73 73 65  |enough"..P..asse|
000000c0  6d 62 6c 65 0d 00 5a 17  fb 31 39 31 c8 9c 31 39  |mble..Z..191..19|
000000d0  32 3a db 3a fb 31 32 38  c8 9c 30 0d 00 64 13 4d  |2:.:.128..0..d.M|
000000e0  43 25 3d 31 2b 41 43 25  2b 41 43 25 2d 39 0d 00  |C%=1+AC%+AC%-9..|
000000f0  6e 05 f5 0d 00 78 0e c8  97 58 25 2c 59 25 2c 5a  |n....x...X%,Y%,Z|
00000100  25 0d 00 82 25 21 63 78  25 3d 58 25 2d 36 34 30  |%...%!cx%=X%-640|
00000110  3c 3c 4d 43 25 3a 21 63  79 25 3d 59 25 2d 35 31  |<<MC%:!cy%=Y%-51|
00000120  32 3c 3c 4d 43 25 0d 00  8c 0b d6 6a 75 6c 69 61  |2<<MC%.....julia|
00000130  25 0d 00 96 09 fd 5a 25  3e 30 0d 00 a0 05 e0 0d  |%.....Z%>0......|
00000140  00 aa 05 3a 0d 00 b4 05  3a 0d 00 be 0f dd f2 63  |...:....:......c|
00000150  6f 6e 73 74 61 6e 74 73  0d 00 c8 14 73 70 61 63  |onstants....spac|
00000160  65 6c 65 6e 25 3d 26 38  30 30 30 30 0d 00 d2 12  |elen%=&80000....|
00000170  63 6f 64 65 6c 65 6e 25  3d 26 34 30 30 30 0d 00  |codelen%=&4000..|
00000180  dc 16 41 43 25 3d 31 34  3a 50 43 25 3d 41 43 25  |..AC%=14:PC%=AC%|
00000190  2b 32 2d 38 0d 00 e6 1b  de 69 73 6b 69 70 25 28  |+2-8.....iskip%(|
000001a0  31 32 29 2c 64 69 73 6b  69 70 25 28 31 32 29 0d  |12),diskip%(12).|
000001b0  00 f0 05 e1 0d 00 fa 05  3a 0d 01 04 0e dd f2 61  |........:......a|
000001c0  73 73 65 6d 62 6c 65 0d  01 0e 16 e3 54 25 3d 30  |ssemble.....T%=0|
000001d0  b8 32 88 32 3a 50 25 3d  63 6f 64 65 25 0d 01 18  |.2.2:P%=code%...|
000001e0  0b 5b 4f 50 54 20 54 25  0d 01 22 05 3a 0d 01 2c  |.[OPT T%..".:..,|
000001f0  0a 2e 74 65 73 74 25 0d  01 36 23 45 51 55 44 20  |..test%..6#EQUD |
00000200  2d 31 3a 45 51 55 44 20  2d 31 3a 45 51 55 44 20  |-1:EQUD -1:EQUD |
00000210  2d 31 3a 45 51 55 44 20  2d 31 0d 01 40 23 45 51  |-1:EQUD -1..@#EQ|
00000220  55 44 20 2d 31 3a 45 51  55 44 20 2d 31 3a 45 51  |UD -1:EQUD -1:EQ|
00000230  55 44 20 2d 31 3a 45 51  55 44 20 2d 31 0d 01 4a  |UD -1:EQUD -1..J|
00000240  23 45 51 55 44 20 2d 31  3a 45 51 55 44 20 2d 31  |#EQUD -1:EQUD -1|
00000250  3a 45 51 55 44 20 2d 31  3a 45 51 55 44 20 2d 31  |:EQUD -1:EQUD -1|
00000260  0d 01 54 23 45 51 55 44  20 2d 31 3a 45 51 55 44  |..T#EQUD -1:EQUD|
00000270  20 2d 31 3a 45 51 55 44  20 2d 31 3a 45 51 55 44  | -1:EQUD -1:EQUD|
00000280  20 2d 31 0d 01 5e 05 3a  0d 01 68 1e 2e 76 64 75  | -1..^.:..h..vdu|
00000290  76 61 72 73 25 3a 45 51  55 44 20 31 34 38 3a 45  |vars%:EQUD 148:E|
000002a0  51 55 44 20 2d 31 0d 01  72 15 2e 73 63 72 61 64  |QUD -1..r..scrad|
000002b0  64 72 25 3a 45 51 55 44  20 2d 31 0d 01 7c 05 3a  |dr%:EQUD -1..|.:|
000002c0  0d 01 86 0f 2e 63 78 25  3a 45 51 55 44 20 30 0d  |.....cx%:EQUD 0.|
000002d0  01 90 0f 2e 63 79 25 3a  45 51 55 44 20 30 0d 01  |....cy%:EQUD 0..|
000002e0  9a 05 3a 0d 01 a4 0b 2e  6a 75 6c 69 61 25 0d 01  |..:.....julia%..|
000002f0  ae 1b 53 54 4d 46 44 20  52 31 33 21 2c 7b 52 30  |..STMFD R13!,{R0|
00000300  2d 52 31 32 2c 52 31 34  7d 0d 01 b8 13 41 44 52  |-R12,R14}....ADR|
00000310  20 52 30 2c 76 64 75 76  61 72 73 25 0d 01 c2 13  | R0,vduvars%....|
00000320  41 44 52 20 52 31 2c 73  63 72 61 64 64 72 25 0d  |ADR R1,scraddr%.|
00000330  01 cc 1d 53 57 49 20 22  4f 53 5f 52 65 61 64 56  |...SWI "OS_ReadV|
00000340  64 75 56 61 72 69 61 62  6c 65 73 22 0d 01 d6 0e  |duVariables"....|
00000350  41 44 52 20 52 30 2c 63  78 25 0d 01 e0 14 4c 44  |ADR R0,cx%....LD|
00000360  4d 49 41 20 52 30 2c 7b  52 30 2d 52 31 7d 0d 01  |MIA R0,{R0-R1}..|
00000370  ea 0d 4d 4f 56 20 52 32  2c 23 30 0d 01 f4 0d 4d  |..MOV R2,#0....M|
00000380  4f 56 20 52 33 2c 23 30  0d 01 fe 1c 3b 20 4d 6f  |OV R3,#0....; Mo|
00000390  76 65 20 6c 65 66 74 20  61 6e 64 20 75 70 20 31  |ve left and up 1|
000003a0  32 37 2e 35 0d 02 08 35  53 55 42 20 52 30 2c 52  |27.5...5SUB R0,R|
000003b0  30 2c 52 32 2c 41 53 4c  23 31 2b 50 43 25 2b 37  |0,R2,ASL#1+PC%+7|
000003c0  3a 53 55 42 20 52 31 2c  52 31 2c 52 33 2c 41 53  |:SUB R1,R1,R3,AS|
000003d0  4c 23 31 2b 50 43 25 2b  37 0d 02 12 1b 41 44 44  |L#1+PC%+7....ADD|
000003e0  20 52 30 2c 52 30 2c 23  31 3c 3c 32 2a 28 50 43  | R0,R0,#1<<2*(PC|
000003f0  25 2b 37 29 0d 02 1c 17  53 55 42 20 52 32 2c 52  |%+7)....SUB R2,R|
00000400  32 2c 23 31 3c 3c 50 43  25 2b 37 0d 02 26 35 41  |2,#1<<PC%+7..&5A|
00000410  44 44 20 52 31 2c 52 31  2c 52 32 2c 41 53 4c 23  |DD R1,R1,R2,ASL#|
00000420  31 2b 50 43 25 2b 37 3a  53 55 42 20 52 30 2c 52  |1+PC%+7:SUB R0,R|
00000430  30 2c 52 33 2c 41 53 4c  23 31 2b 50 43 25 2b 37  |0,R3,ASL#1+PC%+7|
00000440  0d 02 30 1b 53 55 42 20  52 30 2c 52 30 2c 23 31  |..0.SUB R0,R0,#1|
00000450  3c 3c 32 2a 28 50 43 25  2b 37 29 0d 02 3a 17 41  |<<2*(PC%+7)..:.A|
00000460  44 44 20 52 33 2c 52 33  2c 23 31 3c 3c 50 43 25  |DD R3,R3,#1<<PC%|
00000470  2b 37 0d 02 44 35 41 44  44 20 52 30 2c 52 30 2c  |+7..D5ADD R0,R0,|
00000480  52 32 2c 41 53 4c 23 31  2b 50 43 25 2d 31 3a 41  |R2,ASL#1+PC%-1:A|
00000490  44 44 20 52 31 2c 52 31  2c 52 33 2c 41 53 4c 23  |DD R1,R1,R3,ASL#|
000004a0  31 2b 50 43 25 2d 31 0d  02 4e 1b 41 44 44 20 52  |1+PC%-1..N.ADD R|
000004b0  30 2c 52 30 2c 23 31 3c  3c 32 2a 28 50 43 25 2d  |0,R0,#1<<2*(PC%-|
000004c0  31 29 0d 02 58 17 41 44  44 20 52 32 2c 52 32 2c  |1)..X.ADD R2,R2,|
000004d0  23 31 3c 3c 50 43 25 2d  31 0d 02 62 35 53 55 42  |#1<<PC%-1..b5SUB|
000004e0  20 52 31 2c 52 31 2c 52  32 2c 41 53 4c 23 31 2b  | R1,R1,R2,ASL#1+|
000004f0  50 43 25 2d 31 3a 41 44  44 20 52 30 2c 52 30 2c  |PC%-1:ADD R0,R0,|
00000500  52 33 2c 41 53 4c 23 31  2b 50 43 25 2d 31 0d 02  |R3,ASL#1+PC%-1..|
00000510  6c 1b 53 55 42 20 52 30  2c 52 30 2c 23 31 3c 3c  |l.SUB R0,R0,#1<<|
00000520  32 2a 28 50 43 25 2d 31  29 0d 02 76 17 53 55 42  |2*(PC%-1)..v.SUB|
00000530  20 52 33 2c 52 33 2c 23  31 3c 3c 50 43 25 2d 31  | R3,R3,#1<<PC%-1|
00000540  0d 02 80 18 4f 50 54 20  a4 61 64 72 28 31 32 2c  |....OPT .adr(12,|
00000550  67 72 69 64 25 2c 32 29  0d 02 8a 1a 41 44 44 20  |grid%,2)....ADD |
00000560  52 31 30 2c 52 31 32 2c  23 34 2a 32 35 36 2a 31  |R10,R12,#4*256*1|
00000570  32 38 0d 02 94 10 4d 4f  56 20 52 31 31 2c 23 31  |28....MOV R11,#1|
00000580  32 38 0d 02 9e 0b 2e 79  6c 6f 6f 70 25 0d 02 a8  |28.....yloop%...|
00000590  17 41 44 44 20 52 32 2c  52 32 2c 23 31 3c 3c 50  |.ADD R2,R2,#1<<P|
000005a0  43 25 2d 31 0d 02 b2 18  53 55 42 20 52 31 31 2c  |C%-1....SUB R11,|
000005b0  52 31 31 2c 23 32 35 36  3c 3c 31 36 0d 02 bc 0b  |R11,#256<<16....|
000005c0  2e 78 6c 6f 6f 70 25 0d  02 c6 1d 3b 20 57 6f 72  |.xloop%....; Wor|
000005d0  6b 20 6f 75 74 20 74 61  72 67 65 74 20 61 64 64  |k out target add|
000005e0  72 65 73 73 0d 02 d0 0f  4d 56 4e 20 52 36 2c 23  |ress....MVN R6,#|
000005f0  ac 2d 31 0d 02 da 1b 4d  4f 56 20 52 34 2c 52 30  |.-1....MOV R4,R0|
00000600  2c 41 53 52 23 32 2b 32  2a 41 43 25 2d 38 0d 02  |,ASR#2+2*AC%-8..|
00000610  e4 13 52 53 42 53 20 52  34 2c 52 34 2c 23 31 32  |..RSBS R4,R4,#12|
00000620  37 0d 02 ee 15 52 53 42  47 45 53 20 52 34 2c 52  |7....RSBGES R4,R|
00000630  34 2c 23 32 35 35 0d 02  f8 0e 42 4c 54 20 73 6b  |4,#255....BLT sk|
00000640  69 70 78 25 0d 03 02 1b  4d 56 4e 20 52 35 2c 52  |ipx%....MVN R5,R|
00000650  31 2c 41 53 52 23 32 2b  32 2a 41 43 25 2d 38 0d  |1,ASR#2+2*AC%-8.|
00000660  03 0c 17 41 44 44 53 20  52 35 2c 52 34 2c 52 35  |...ADDS R5,R4,R5|
00000670  2c 41 53 4c 23 38 0d 03  16 0f 4d 56 4e 47 45 20  |,ASL#8....MVNGE |
00000680  52 35 2c 52 35 0d 03 20  13 43 4d 4e 20 52 35 2c  |R5,R5.. .CMN R5,|
00000690  23 31 32 38 2a 32 35 36  0d 03 2a 19 41 44 44 47  |#128*256..*.ADDG|
000006a0  45 20 52 36 2c 52 31 30  2c 52 35 2c 41 53 4c 23  |E R6,R10,R5,ASL#|
000006b0  32 0d 03 34 0b 2e 73 6b  69 70 78 25 0d 03 3e 13  |2..4..skipx%..>.|
000006c0  53 54 52 20 52 36 2c 5b  52 31 32 5d 2c 23 34 0d  |STR R6,[R12],#4.|
000006d0  03 48 12 3b 20 4d 6f 76  65 20 72 69 67 68 74 20  |.H.; Move right |
000006e0  31 0d 03 52 31 41 44 44  20 52 30 2c 52 30 2c 52  |1..R1ADD R0,R0,R|
000006f0  32 2c 41 53 4c 23 31 2b  50 43 25 3a 41 44 44 20  |2,ASL#1+PC%:ADD |
00000700  52 31 2c 52 31 2c 52 33  2c 41 53 4c 23 31 2b 50  |R1,R1,R3,ASL#1+P|
00000710  43 25 0d 03 5c 15 41 44  44 20 52 32 2c 52 32 2c  |C%..\.ADD R2,R2,|
00000720  23 31 3c 3c 50 43 25 0d  03 66 17 41 44 44 53 20  |#1<<PC%..f.ADDS |
00000730  52 31 31 2c 52 31 31 2c  23 31 3c 3c 31 36 0d 03  |R11,R11,#1<<16..|
00000740  70 0e 42 4c 45 20 78 6c  6f 6f 70 25 0d 03 7a 17  |p.BLE xloop%..z.|
00000750  53 55 42 20 52 32 2c 52  32 2c 23 31 3c 3c 50 43  |SUB R2,R2,#1<<PC|
00000760  25 2d 31 0d 03 84 1e 3b  20 4d 6f 76 65 20 6c 65  |%-1....; Move le|
00000770  66 74 20 32 35 36 20 61  6e 64 20 64 6f 77 6e 20  |ft 256 and down |
00000780  31 0d 03 8e 35 53 55 42  20 52 30 2c 52 30 2c 52  |1...5SUB R0,R0,R|
00000790  32 2c 41 53 4c 23 31 2b  50 43 25 2b 38 3a 53 55  |2,ASL#1+PC%+8:SU|
000007a0  42 20 52 31 2c 52 31 2c  52 33 2c 41 53 4c 23 31  |B R1,R1,R3,ASL#1|
000007b0  2b 50 43 25 2b 38 0d 03  98 1b 41 44 44 20 52 30  |+PC%+8....ADD R0|
000007c0  2c 52 30 2c 23 31 3c 3c  32 2a 28 50 43 25 2b 38  |,R0,#1<<2*(PC%+8|
000007d0  29 0d 03 a2 17 53 55 42  20 52 32 2c 52 32 2c 23  |)....SUB R2,R2,#|
000007e0  31 3c 3c 50 43 25 2b 38  0d 03 ac 31 53 55 42 20  |1<<PC%+8...1SUB |
000007f0  52 31 2c 52 31 2c 52 32  2c 41 53 4c 23 31 2b 50  |R1,R1,R2,ASL#1+P|
00000800  43 25 3a 41 44 44 20 52  30 2c 52 30 2c 52 33 2c  |C%:ADD R0,R0,R3,|
00000810  41 53 4c 23 31 2b 50 43  25 0d 03 b6 17 53 55 42  |ASL#1+PC%....SUB|
00000820  20 52 30 2c 52 30 2c 23  31 3c 3c 32 2a 50 43 25  | R0,R0,#1<<2*PC%|
00000830  0d 03 c0 15 53 55 42 20  52 33 2c 52 33 2c 23 31  |....SUB R3,R3,#1|
00000840  3c 3c 50 43 25 0d 03 ca  13 53 55 42 53 20 52 31  |<<PC%....SUBS R1|
00000850  31 2c 52 31 31 2c 23 31  0d 03 d4 0e 42 47 54 20  |1,R11,#1....BGT |
00000860  79 6c 6f 6f 70 25 0d 03  de 0c 3b 20 49 6e 63 65  |yloop%....; Ince|
00000870  73 74 0d 03 e8 17 4f 50  54 20 a4 61 64 72 28 33  |st....OPT .adr(3|
00000880  2c 67 72 69 64 25 2c 32  29 0d 03 f2 13 4c 44 52  |,grid%,2)....LDR|
00000890  20 52 30 2c 73 63 72 61  64 64 72 25 0d 03 fc 19  | R0,scraddr%....|
000008a0  41 44 44 20 52 30 2c 52  30 2c 23 33 32 30 2d 32  |ADD R0,R0,#320-2|
000008b0  35 36 3e 3e 31 0d 04 06  16 41 44 44 20 52 31 2c  |56>>1....ADD R1,|
000008c0  52 30 2c 23 33 32 30 2a  32 35 36 0d 04 10 0f 4d  |R0,#320*256....M|
000008d0  4f 56 20 52 32 2c 23 31  32 38 0d 04 1a 0b 2e 79  |OV R2,#128.....y|
000008e0  6c 6f 6f 70 25 0d 04 24  16 53 55 42 20 52 31 2c  |loop%..$.SUB R1,|
000008f0  52 31 2c 23 33 32 30 2d  32 35 36 0d 04 2e 16 53  |R1,#320-256....S|
00000900  55 42 20 52 32 2c 52 32  2c 23 32 35 36 3c 3c 31  |UB R2,R2,#256<<1|
00000910  36 0d 04 38 0b 2e 78 6c  6f 6f 70 25 0d 04 42 0d  |6..8..xloop%..B.|
00000920  5c 53 57 49 20 26 31 31  45 0d 04 4c 16 5d 3a e3  |\SWI &11E..L.]:.|
00000930  55 25 3d 34 b8 31 32 3a  5b 4f 50 54 20 54 25 0d  |U%=4.12:[OPT T%.|
00000940  04 56 14 4c 44 52 20 52  31 32 2c 5b 28 55 25 2d  |.V.LDR R12,[(U%-|
00000950  31 29 5d 0d 04 60 12 53  55 42 53 20 55 25 2c 52  |1)]..`.SUBS U%,R|
00000960  31 32 2c 23 30 0d 04 6a  12 42 4c 45 20 69 73 6b  |12,#0..j.BLE isk|
00000970  69 70 25 28 55 25 29 0d  04 74 0f 5d 3a ed 3a 5b  |ip%(U%)..t.]:.:[|
00000980  4f 50 54 20 54 25 0d 04  7e 12 42 4c 20 64 65 65  |OPT T%..~.BL dee|
00000990  70 69 6e 63 65 73 74 25  0d 04 88 0e 43 4d 50 20  |pincest%....CMP |
000009a0  52 31 32 2c 23 30 0d 04  92 19 5d 3a e3 55 25 3d  |R12,#0....]:.U%=|
000009b0  31 32 b8 34 88 2d 31 3a  5b 4f 50 54 20 54 25 0d  |12.4.-1:[OPT T%.|
000009c0  04 9c 14 53 55 42 4c 54  20 52 31 32 2c 52 31 32  |...SUBLT R12,R12|
000009d0  2c 23 31 0d 04 a6 14 53  54 52 20 52 31 32 2c 5b  |,#1....STR R12,[|
000009e0  28 55 25 2d 31 29 5d 0d  04 b0 0f 2e 69 73 6b 69  |(U%-1)].....iski|
000009f0  70 25 28 55 25 29 0d 04  ba 0f 5d 3a ed 3a 5b 4f  |p%(U%)....]:.:[O|
00000a00  50 54 20 54 25 0d 04 c4  14 53 54 52 42 20 52 31  |PT T%....STRB R1|
00000a10  32 2c 5b 52 30 5d 2c 23  31 0d 04 ce 16 53 54 52  |2,[R0],#1....STR|
00000a20  42 20 52 31 32 2c 5b 52  31 2c 23 2d 31 5d 21 0d  |B R12,[R1,#-1]!.|
00000a30  04 d8 10 41 44 44 20 52  33 2c 52 33 2c 23 34 0d  |...ADD R3,R3,#4.|
00000a40  04 e2 15 41 44 44 53 20  52 32 2c 52 32 2c 23 31  |...ADDS R2,R2,#1|
00000a50  3c 3c 31 36 0d 04 ec 0e  42 4c 45 20 78 6c 6f 6f  |<<16....BLE xloo|
00000a60  70 25 0d 04 f6 16 41 44  44 20 52 30 2c 52 30 2c  |p%....ADD R0,R0,|
00000a70  23 33 32 30 2d 32 35 36  0d 05 00 11 53 55 42 53  |#320-256....SUBS|
00000a80  20 52 32 2c 52 32 2c 23  31 0d 05 0a 0e 42 47 54  | R2,R2,#1....BGT|
00000a90  20 79 6c 6f 6f 70 25 0d  05 14 0d 5c 53 57 49 20  | yloop%....\SWI |
00000aa0  26 31 30 41 0d 05 1e 1b  4c 44 4d 46 44 20 52 31  |&10A....LDMFD R1|
00000ab0  33 21 2c 7b 52 30 2d 52  31 32 2c 50 43 7d 5e 0d  |3!,{R0-R12,PC}^.|
00000ac0  05 28 05 3a 0d 05 32 27  3b 20 52 31 32 20 69 73  |.(.:..2'; R12 is|
00000ad0  20 61 64 64 72 65 73 73  20 6f 66 20 70 69 78 65  | address of pixe|
00000ae0  6c 20 74 6f 20 73 65 61  72 63 68 0d 05 3c 21 3b  |l to search..<!;|
00000af0  20 41 6c 6c 20 72 65 6c  65 76 61 6e 74 20 70 69  | All relevant pi|
00000b00  78 65 6c 73 20 75 70 64  61 74 65 64 0d 05 46 1c  |xels updated..F.|
00000b10  3b 20 43 6f 6c 6f 75 72  20 72 65 74 75 72 6e 65  |; Colour returne|
00000b20  64 20 69 6e 20 52 31 32  0d 05 50 05 3a 0d 05 5a  |d in R12..P.:..Z|
00000b30  10 2e 64 65 65 70 69 6e  63 65 73 74 25 0d 05 64  |..deepincest%..d|
00000b40  1b 53 54 4d 46 44 20 52  31 33 21 2c 7b 52 30 2d  |.STMFD R13!,{R0-|
00000b50  52 31 31 2c 52 31 34 7d  0d 05 6e 0e 4d 4f 56 20  |R11,R14}..n.MOV |
00000b60  52 30 2c 52 31 32 0d 05  78 0e 4d 4f 56 20 52 31  |R0,R12..x.MOV R1|
00000b70  34 2c 23 30 0d 05 82 16  5d 3a e3 55 25 3d 31 b8  |4,#0....]:.U%=1.|
00000b80  31 32 3a 5b 4f 50 54 20  54 25 0d 05 8c 10 5c 53  |12:[OPT T%....\S|
00000b90  57 49 20 26 31 36 30 2b  55 25 0d 05 96 14 4c 44  |WI &160+U%....LD|
00000ba0  52 20 52 31 32 2c 5b 28  55 25 2d 31 29 5d 0d 05  |R R12,[(U%-1)]..|
00000bb0  a0 12 53 55 42 53 20 55  25 2c 52 31 32 2c 23 30  |..SUBS U%,R12,#0|
00000bc0  0d 05 aa 13 42 4c 45 20  64 69 73 6b 69 70 25 28  |....BLE diskip%(|
00000bd0  55 25 29 0d 05 b4 14 53  54 52 20 52 31 34 2c 5b  |U%)....STR R14,[|
00000be0  28 55 25 2d 31 29 5d 0d  05 be 0f 5d 3a ed 3a 5b  |(U%-1)]....]:.:[|
00000bf0  4f 50 54 20 54 25 0d 05  c8 12 42 4c 20 64 65 65  |OPT T%....BL dee|
00000c00  70 69 6e 63 65 73 74 25  0d 05 d2 0e 43 4d 50 20  |pincest%....CMP |
00000c10  52 31 32 2c 23 30 0d 05  dc 19 5d 3a e3 55 25 3d  |R12,#0....]:.U%=|
00000c20  31 32 b8 31 88 2d 31 3a  5b 4f 50 54 20 54 25 0d  |12.1.-1:[OPT T%.|
00000c30  05 e6 14 53 55 42 4c 54  20 52 31 32 2c 52 31 32  |...SUBLT R12,R12|
00000c40  2c 23 31 0d 05 f0 14 53  54 52 20 52 31 32 2c 5b  |,#1....STR R12,[|
00000c50  28 55 25 2d 31 29 5d 0d  05 fa 10 2e 64 69 73 6b  |(U%-1)].....disk|
00000c60  69 70 25 28 55 25 29 0d  06 04 0f 5d 3a ed 3a 5b  |ip%(U%)....]:.:[|
00000c70  4f 50 54 20 54 25 0d 06  0e 1b 4c 44 4d 46 44 20  |OPT T%....LDMFD |
00000c80  52 31 33 21 2c 7b 52 30  2d 52 31 31 2c 50 43 7d  |R13!,{R0-R11,PC}|
00000c90  5e 0d 06 18 05 3a 0d 06  22 35 5d 3a e7 50 25 3e  |^....:.."5]:.P%>|
00000ca0  63 6f 64 65 25 2b 63 6f  64 65 6c 65 6e 25 8c 85  |code%+codelen%..|
00000cb0  32 35 35 2c 22 43 6f 64  65 20 69 73 6e 27 74 20  |255,"Code isn't |
00000cc0  62 69 67 20 65 6e 6f 75  67 68 22 0d 06 2c 05 ed  |big enough"..,..|
00000cd0  0d 06 36 05 e1 0d ff                              |..6....|
00000cd7