Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199512_2.adf » !Regulars » Regulars/StarInfo/Fernando/IronFile3

Regulars/StarInfo/Fernando/IronFile3

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_199512_2.adf » !Regulars
Filename: Regulars/StarInfo/Fernando/IronFile3
Read OK:
File size: 12E3 bytes
Load address: 0000
Exec address: 0000
File contents
   10 REM >IronFile3
   20 MODE15
   30 MODE13
   40 top=0:bot=1:result=2:sign=3:bit=4:sp=13:link=14:pc=15
   50 DIM buffer 32
   60 DIM code 4096
   70 FOR pass=0 TO 2 STEP 2
   80 P%=code
   90 [
  100 OPT pass
  101 .start
  110 MOV R12,R14
  111 SWI "OS_Mouse"
  120 STMFD (sp)!,{R0,R1}
  130 ADR R0,vdup
  140 ADR R1,vdu
  150 SWI "OS_ReadVduVariables"
  160 LDMFD (sp)!,{R0,R1}
  170 MOV R0,R0,ASR #2
  180 MOV R1,R1,ASR #2
  190 STR R0,npolex
  200 STR R1,npoley
  210 MOV R2,#32
  220 .xloop
  230 CMP R2,#264
  240 BGT wait
  250 LDR R0,npolex
  260 SUB R0,R0,R2
  270 ADD R2,R2,#8
  280 MOV R3,#8
  290 .yloop
  300 CMP R3,#240
  310 BGT xloop
  320 ADD R3,R3,#8
  330 STR R2,xpos
  340 STR R3,ypos
  350 LDR R1,npoley
  360 SUB R1,R1,R3
  370 SUB R4,R2,#160
  380 SUB R5,R3,#128
  390 MUL R6,R0,R0
  400 MUL R7,R1,R1
  410 ADD R6,R6,R7
  420 CMP R6,#400
  430 BLT yloop
  440 MUL R7,R4,R4
  450 MUL R8,R5,R5
  460 ADD R7,R7,R8
  470 ADD R7,R7,R7
  480 CMP R7,#0
  490 BEQ yloop
  500 MUL R8,R0,R7
  510 MUL R9,R4,R6
  520 ADD R8,R8,R9
  530 MOV R8,R8,LSL #11
  540 MUL R9,R6,R7
  550 STMFD (sp)!,{R0-R7}
  560 MOV R0,R8
  570 MOV R1,R9
  580 BL divide
  590 STR R0,xoff
  600 LDMFD (sp)!,{R0-R7}
  610 MUL R9,R1,R7
  620 MUL R10,R5,R6
  630 ADD R9,R9,R10
  640 MOV R9,R9,LSL #11
  650 MUL R10,R6,R7
  660 STMFD (sp)!,{R0-R11}
  670 MOV R0,R9
  680 MOV R1,R10
  690 BL divide
  700 STR R0,yoff
  710 LDR R0,xpos
  720 LDR R1,xoff
  730 MOV R1,R1,ASR#2
  740 ADD R0,R0,R1
  750 LDR R1,ypos
  760 LDR R2,yoff
  761 RSB R1,R1,#256
  780 MOV R2,R2,ASR#2
  790 RSB R2,R2,#0
  800 ADD R1,R1,R2
  810 MOV R2,#255
  820 BL plopo
  821 B back
  822 .back
  830 LDMFD (sp)!,{R0-R11}
  850 B yloop
  860 .end
  870 MOV PC,R12
  880 .xpos EQUD 0
  890 .ypos EQUD 0
  900 .xoff EQUD 0
  910 .yoff EQUD 0
  920 .npolex EQUD 0
  930 .npoley EQUD 0
  940 .bank EQUD 1
  950 .vdup EQUD 148
  960 EQUD -1
  970 .vdu EQUD 0
  980 .divide
  990 STMFD (sp)!,{result,sign,bit}
 1000 MOV result,#0
 1010 MOV bit,#1
 1020 EOR sign,top,bot
 1030 CMP bot,#0
 1040 RSBMI bot,bot,#0
 1050 CMP top,#0
 1060 RSBMI top,top,#0
 1070 CMP top,#2^24
 1080 BLT skip1
 1090 FNdiv(31)
 1100 FNdiv(30)
 1110 FNdiv(29)
 1120 FNdiv(28)
 1130 FNdiv(27)
 1140 FNdiv(26)
 1150 FNdiv(25)
 1160 .skip1
 1170 CMP top,#2^16
 1180 BLT skip2
 1190 FNdiv(24)
 1200 FNdiv(23)
 1210 FNdiv(22)
 1220 FNdiv(21)
 1230 FNdiv(20)
 1240 FNdiv(19)
 1250 FNdiv(18)
 1260 FNdiv(17)
 1270 .skip2
 1280 CMP top,#2^8
 1290 BLT skip3
 1300 FNdiv(16)
 1310 FNdiv(15)
 1320 FNdiv(14)
 1330 FNdiv(13)
 1340FNdiv(12)
 1350FNdiv(11)
 1360FNdiv(10)
 1370FNdiv(9)
 1380FNdiv(8)
 1390 .skip3
 1400 FNdiv(7)
 1410 FNdiv(6)
 1420 FNdiv(5)
 1430 FNdiv(4)
 1440 FNdiv(3)
 1450 FNdiv(2)
 1460 FNdiv(1)
 1470 FNdiv(0)
 1480 .donediv
 1490 MOV top,result
 1500 CMP sign,#0
 1510 RSBMI top,top,#0
 1520 LDMFD (sp)!,{result,sign,bit}
 1530 MOV PC,R14
 1540 .linex
 1550 MOV R9,R0
 1560 MOV R8,R1
 1570 MOV R0,R5
 1580 MOV R1,R4
 1590 MOV R11,R4
 1600 STMFD (sp)!,{R2,R3}
 1610 BL divide
 1620 MOV R4,R0
 1630 MUL R1,R11,R0
 1640 SUB R5,R5,R1
 1650 LDMFD (sp)!,{R2,R3}
 1660 MOV R10,#0
 1670 CMP R3,#0
 1680 MOVGT R6,#1
 1690 MVNLE R6,#0
 1700 CMP R2,#0
 1710 MVNLE R7,#0
 1720 MOVGT R7,#1
 1730 ADD R0,R8,R3
 1740 MUL R1,R4,R7
 1750 .linexloop
 1760 STMFD (sp)!,{R0-R4}
 1770 MOV R0,R9
 1780 MOV R1,R8
 1790 MOV R2,#255
 1800 BL plopo
 1810 LDMFD (sp)!,{R0-R4}
 1820 CMP R6,#0
 1830 CMPGT R8,R0
 1840 BGE back
 1850 CMP R6,#0
 1860 CMPLT R8,R0
 1870 BLE back
 1880 ADD R8,R8,R6
 1890 ADD R9,R9,R1
 1900 ADD R10,R10,R5
 1910 STMFD (sp)!,{R0-R4,R10}
 1920 MOV R0,R10
 1930 MOV R1,R3
 1940 MOV R11,R3
 1950 BL divide
 1960 MUL R1,R11,R0
 1970 SUB R10,R10,R1
 1980 CMP R10,R5
 1990 LDMFD (sp)!,{R0-R4,R10}
 2000 ADDLT R9,R9,R7
 2010 B linexloop
 2020 .liney
 2030 MOV R9,R0
 2040 MOV R8,R1
 2050 MOV R0,R4
 2060 MOV R1,R5
 2070 MOV R11,R4
 2080 STMFD (sp)!,{R2,R3}
 2090 BL divide
 2100 MOV R4,R0
 2110 MUL R1,R5,R0
 2120 SUB R5,R11,R1
 2130 LDMFD (sp)!,{R2,R3}
 2140 MOV R10,#0
 2150 CMP R3,#0
 2160 MOVGT R6,#1
 2170 MVNLE R6,#0
 2180 CMP R2,#0
 2190 MVNLE R7,#0
 2200 MOVGT R7,#1
 2210 ADD R0,R9,R2
 2220 MUL R1,R4,R6
 2230 .lineyloop
 2240 STMFD (sp)!,{R0-R4}
 2250 MOV R0,R9
 2260 MOV R1,R8
 2270 MOV R2,#255
 2280 BL plopo
 2290 LDMFD (sp)!,{R0-R4}
 2300 CMP R7,#0
 2310 CMPGT R9,R0
 2320 BGE back
 2330 CMP R7,#0
 2340 CMPLT R9,R0
 2350 BLE back
 2360 ADD R9,R9,R7
 2370 ADD R8,R8,R1
 2380 ADD R10,R10,R5
 2390 STMFD (sp)!,{R0-R4,R10}
 2400 MOV R0,R10
 2410 MOV R1,R2
 2420 MOV R11,R2
 2430 BL divide
 2440 MUL R1,R11,R0
 2450 SUB R10,R10,R1
 2460 CMP R10,R5
 2470 LDMFD (sp)!,{R0-R4,R10}
 2480 ADDLT R8,R8,R6
 2490 B lineyloop
 2500 .plopo
 2510 CMP R1,#0
 2520 MOVLT PC,R14
 2530 CMP R1,#255
 2540 MOVGT PC,R14
 2550 LDR R3,vdu
 2570 ADD R3,R3,R1,LSL #8
 2580 ADD R3,R3,R1,LSL #6
 2590 STRB R2,[R3,R0]
 2600 MOV PC,R14
 2610 .wait
 2620 MOV R0,#19
 2630 SWI "XOS_Byte"
 2640 MOV R0,#112
 2650 LDR R1,bank
 2660 SWI "XOS_Byte"
 2670 LDR R1,bank
 2680 RSB r1,r1,#3
 2690 STR R1,bank
 2700 MOV r0,#113
 2710 SWI "XOS_Byte"
 2720 SWI &100+12
 2721 SWI "XOS_ReadEscapeState"
 2722 BCC start
 2730 MOV PC,R12
 2740 ]
 2750 NEXT
 2760 MOUSE RECTANGLE 160,64,896,896
 2770 MOUSE ON
 2780 CALL code
 2800 END
 2810 DEF FNdiv(it)
 2820 IF it>0 THEN
 2830 [OPT pass
 2840 CMP bot,top,LSR #it
 2850 ORRLE result,result,bit,ASL #it
 2860 SUBLE top,top,bot,ASL #it
 2870 ]
 2880 ELSE
 2890 [OPT pass
 2900 CMP bot,top
 2910 ORRLE result,result,#1
 2920 SUBLE top,top,bot
 2930 ]
 2940 ENDIF
 2950 =""

 � >IronFile3
 �15
 �13
(: top=0:bot=1:result=2:sign=3:bit=4:sp=13:link=14:pc=15
2 � buffer 32
< � code 4096
F � pass=0 � 2 � 2
P P%=code
Z [
d
 OPT pass
e .start
n MOV R12,R14
o SWI "OS_Mouse"
x STMFD (sp)!,{R0,R1}
� ADR R0,vdup
� ADR R1,vdu
� SWI "OS_ReadVduVariables"
� LDMFD (sp)!,{R0,R1}
� MOV R0,R0,ASR #2
� MOV R1,R1,ASR #2
� STR R0,npolex
� STR R1,npoley
� MOV R2,#32
� .xloop
� CMP R2,#264
�
 BGT wait
� LDR R0,npolex
 SUB R0,R0,R2
 ADD R2,R2,#8
 MOV R3,#8
" .yloop
, CMP R3,#240
6 BGT xloop
@ ADD R3,R3,#8
J STR R2,xpos
T STR R3,ypos
^ LDR R1,npoley
h SUB R1,R1,R3
r SUB R4,R2,#160
| SUB R5,R3,#128
� MUL R6,R0,R0
� MUL R7,R1,R1
� ADD R6,R6,R7
� CMP R6,#400
� BLT yloop
� MUL R7,R4,R4
� MUL R8,R5,R5
� ADD R7,R7,R8
� ADD R7,R7,R7
� CMP R7,#0
� BEQ yloop
� MUL R8,R0,R7
� MUL R9,R4,R6
 ADD R8,R8,R9
 MOV R8,R8,LSL #11
 MUL R9,R6,R7
& STMFD (sp)!,{R0-R7}
0 MOV R0,R8
: MOV R1,R9
D BL divide
N STR R0,xoff
X LDMFD (sp)!,{R0-R7}
b MUL R9,R1,R7
l MUL R10,R5,R6
v ADD R9,R9,R10
� MOV R9,R9,LSL #11
� MUL R10,R6,R7
� STMFD (sp)!,{R0-R11}
� MOV R0,R9
� MOV R1,R10
� BL divide
� STR R0,yoff
� LDR R0,xpos
� LDR R1,xoff
� MOV R1,R1,ASR#2
� ADD R0,R0,R1
� LDR R1,ypos
� LDR R2,yoff
� RSB R1,R1,#256
 MOV R2,R2,ASR#2
 RSB R2,R2,#0
  ADD R1,R1,R2
* MOV R2,#255
4
 BL plopo
5 B back
6
 .back
> LDMFD (sp)!,{R0-R11}
R B yloop
\	 .end
f MOV PC,R12
p .xpos EQUD 0
z .ypos EQUD 0
� .xoff EQUD 0
� .yoff EQUD 0
� .npolex EQUD 0
� .npoley EQUD 0
� .bank EQUD 1
� .vdup EQUD 148
� EQUD -1
� .vdu EQUD 0
� .divide
�" STMFD (sp)!,{result,sign,bit}
� MOV result,#0
� MOV bit,#1
� � sign,top,bot
 CMP bot,#0
 RSBMI bot,bot,#0
 CMP top,#0
$ RSBMI top,top,#0
. CMP top,#2^24
8 BLT skip1
B
 �div(31)
L
 �div(30)
V
 �div(29)
`
 �div(28)
j
 �div(27)
t
 �div(26)
~
 �div(25)
� .skip1
� CMP top,#2^16
� BLT skip2
�
 �div(24)
�
 �div(23)
�
 �div(22)
�
 �div(21)
�
 �div(20)
�
 �div(19)
�
 �div(18)
�
 �div(17)
� .skip2
 CMP top,#2^8

 BLT skip3

 �div(16)

 �div(15)
(
 �div(14)
2
 �div(13)
<�div(12)
F�div(11)
P�div(10)
Z�div(9)
d�div(8)
n .skip3
x �div(7)
� �div(6)
� �div(5)
� �div(4)
� �div(3)
� �div(2)
� �div(1)
� �div(0)
�
 .donediv
� MOV top,result
� CMP sign,#0
� RSBMI top,top,#0
�" LDMFD (sp)!,{result,sign,bit}
� MOV PC,R14
 .linex
 MOV R9,R0
 MOV R8,R1
" MOV R0,R5
, MOV R1,R4
6 MOV R11,R4
@ STMFD (sp)!,{R2,R3}
J BL divide
T MOV R4,R0
^ MUL R1,R11,R0
h SUB R5,R5,R1
r LDMFD (sp)!,{R2,R3}
| MOV R10,#0
� CMP R3,#0
� MOVGT R6,#1
� MVNLE R6,#0
� CMP R2,#0
� MVNLE R7,#0
� MOVGT R7,#1
� ADD R0,R8,R3
� MUL R1,R4,R7
� .linexloop
� STMFD (sp)!,{R0-R4}
� MOV R0,R9
� MOV R1,R8
� MOV R2,#255

 BL plopo
 LDMFD (sp)!,{R0-R4}
 CMP R6,#0
& CMPGT R8,R0
0
 BGE back
: CMP R6,#0
D CMPLT R8,R0
N
 BLE back
X ADD R8,R8,R6
b ADD R9,R9,R1
l ADD R10,R10,R5
v STMFD (sp)!,{R0-R4,R10}
� MOV R0,R10
� MOV R1,R3
� MOV R11,R3
� BL divide
� MUL R1,R11,R0
� SUB R10,R10,R1
� CMP R10,R5
� LDMFD (sp)!,{R0-R4,R10}
� ADDLT R9,R9,R7
� B linexloop
� .liney
� MOV R9,R0
� MOV R8,R1
 MOV R0,R4
 MOV R1,R5
 MOV R11,R4
  STMFD (sp)!,{R2,R3}
* BL divide
4 MOV R4,R0
> MUL R1,R5,R0
H SUB R5,R11,R1
R LDMFD (sp)!,{R2,R3}
\ MOV R10,#0
f CMP R3,#0
p MOVGT R6,#1
z MVNLE R6,#0
� CMP R2,#0
� MVNLE R7,#0
� MOVGT R7,#1
� ADD R0,R9,R2
� MUL R1,R4,R6
� .lineyloop
� STMFD (sp)!,{R0-R4}
� MOV R0,R9
� MOV R1,R8
� MOV R2,#255
�
 BL plopo
� LDMFD (sp)!,{R0-R4}
� CMP R7,#0
	 CMPGT R9,R0
	
 BGE back
	 CMP R7,#0
	$ CMPLT R9,R0
	.
 BLE back
	8 ADD R9,R9,R7
	B ADD R8,R8,R1
	L ADD R10,R10,R5
	V STMFD (sp)!,{R0-R4,R10}
	` MOV R0,R10
	j MOV R1,R2
	t MOV R11,R2
	~ BL divide
	� MUL R1,R11,R0
	� SUB R10,R10,R1
	� CMP R10,R5
	� LDMFD (sp)!,{R0-R4,R10}
	� ADDLT R8,R8,R6
	� B lineyloop
	� .plopo
	� CMP R1,#0
	� MOVLT PC,R14
	� CMP R1,#255
	� MOVGT PC,R14
	� LDR R3,vdu

 ADD R3,R3,R1,LSL #8
 ADD R3,R3,R1,LSL #6
 STRB R2,[R3,R0]
( MOV PC,R14
2
 .wait
< MOV R0,#19
F SWI "XOS_Byte"
P MOV R0,#112
Z LDR R1,bank
d SWI "XOS_Byte"
n LDR R1,bank
x RSB r1,r1,#3
� STR R1,bank
� MOV r0,#113
� SWI "XOS_Byte"
� SWI &100+12
� SWI "XOS_ReadEscapeState"
� BCC start
� MOV PC,R12
� ]
� �
� ȗ ȓ 160,64,896,896
�	 ȗ �
� � code
� �
� � �div(it)

 � it>0 �
 [OPT pass
 CMP bot,top,LSR #it
"# �RLE result,result,bit,ASL #it
, SUBLE top,top,bot,ASL #it
6 ]
@ �
J [OPT pass
T CMP bot,top
^ �RLE result,result,#1
h SUBLE top,top,bot
r ]
| �
� =""
�
00000000  0d 00 0a 11 20 f4 20 3e  49 72 6f 6e 46 69 6c 65  |.... . >IronFile|
00000010  33 0d 00 14 08 20 eb 31  35 0d 00 1e 08 20 eb 31  |3.... .15.... .1|
00000020  33 0d 00 28 3a 20 74 6f  70 3d 30 3a 62 6f 74 3d  |3..(: top=0:bot=|
00000030  31 3a 72 65 73 75 6c 74  3d 32 3a 73 69 67 6e 3d  |1:result=2:sign=|
00000040  33 3a 62 69 74 3d 34 3a  73 70 3d 31 33 3a 6c 69  |3:bit=4:sp=13:li|
00000050  6e 6b 3d 31 34 3a 70 63  3d 31 35 0d 00 32 10 20  |nk=14:pc=15..2. |
00000060  de 20 62 75 66 66 65 72  20 33 32 0d 00 3c 10 20  |. buffer 32..<. |
00000070  de 20 63 6f 64 65 20 34  30 39 36 0d 00 46 15 20  |. code 4096..F. |
00000080  e3 20 70 61 73 73 3d 30  20 b8 20 32 20 88 20 32  |. pass=0 . 2 . 2|
00000090  0d 00 50 0c 20 50 25 3d  63 6f 64 65 0d 00 5a 06  |..P. P%=code..Z.|
000000a0  20 5b 0d 00 64 0d 20 4f  50 54 20 70 61 73 73 0d  | [..d. OPT pass.|
000000b0  00 65 0b 20 2e 73 74 61  72 74 0d 00 6e 10 20 4d  |.e. .start..n. M|
000000c0  4f 56 20 52 31 32 2c 52  31 34 0d 00 6f 13 20 53  |OV R12,R14..o. S|
000000d0  57 49 20 22 4f 53 5f 4d  6f 75 73 65 22 0d 00 78  |WI "OS_Mouse"..x|
000000e0  18 20 53 54 4d 46 44 20  28 73 70 29 21 2c 7b 52  |. STMFD (sp)!,{R|
000000f0  30 2c 52 31 7d 0d 00 82  10 20 41 44 52 20 52 30  |0,R1}.... ADR R0|
00000100  2c 76 64 75 70 0d 00 8c  0f 20 41 44 52 20 52 31  |,vdup.... ADR R1|
00000110  2c 76 64 75 0d 00 96 1e  20 53 57 49 20 22 4f 53  |,vdu.... SWI "OS|
00000120  5f 52 65 61 64 56 64 75  56 61 72 69 61 62 6c 65  |_ReadVduVariable|
00000130  73 22 0d 00 a0 18 20 4c  44 4d 46 44 20 28 73 70  |s".... LDMFD (sp|
00000140  29 21 2c 7b 52 30 2c 52  31 7d 0d 00 aa 15 20 4d  |)!,{R0,R1}.... M|
00000150  4f 56 20 52 30 2c 52 30  2c 41 53 52 20 23 32 0d  |OV R0,R0,ASR #2.|
00000160  00 b4 15 20 4d 4f 56 20  52 31 2c 52 31 2c 41 53  |... MOV R1,R1,AS|
00000170  52 20 23 32 0d 00 be 12  20 53 54 52 20 52 30 2c  |R #2.... STR R0,|
00000180  6e 70 6f 6c 65 78 0d 00  c8 12 20 53 54 52 20 52  |npolex.... STR R|
00000190  31 2c 6e 70 6f 6c 65 79  0d 00 d2 0f 20 4d 4f 56  |1,npoley.... MOV|
000001a0  20 52 32 2c 23 33 32 0d  00 dc 0b 20 2e 78 6c 6f  | R2,#32.... .xlo|
000001b0  6f 70 0d 00 e6 10 20 43  4d 50 20 52 32 2c 23 32  |op.... CMP R2,#2|
000001c0  36 34 0d 00 f0 0d 20 42  47 54 20 77 61 69 74 0d  |64.... BGT wait.|
000001d0  00 fa 12 20 4c 44 52 20  52 30 2c 6e 70 6f 6c 65  |... LDR R0,npole|
000001e0  78 0d 01 04 11 20 53 55  42 20 52 30 2c 52 30 2c  |x.... SUB R0,R0,|
000001f0  52 32 0d 01 0e 11 20 41  44 44 20 52 32 2c 52 32  |R2.... ADD R2,R2|
00000200  2c 23 38 0d 01 18 0e 20  4d 4f 56 20 52 33 2c 23  |,#8.... MOV R3,#|
00000210  38 0d 01 22 0b 20 2e 79  6c 6f 6f 70 0d 01 2c 10  |8..". .yloop..,.|
00000220  20 43 4d 50 20 52 33 2c  23 32 34 30 0d 01 36 0e  | CMP R3,#240..6.|
00000230  20 42 47 54 20 78 6c 6f  6f 70 0d 01 40 11 20 41  | BGT xloop..@. A|
00000240  44 44 20 52 33 2c 52 33  2c 23 38 0d 01 4a 10 20  |DD R3,R3,#8..J. |
00000250  53 54 52 20 52 32 2c 78  70 6f 73 0d 01 54 10 20  |STR R2,xpos..T. |
00000260  53 54 52 20 52 33 2c 79  70 6f 73 0d 01 5e 12 20  |STR R3,ypos..^. |
00000270  4c 44 52 20 52 31 2c 6e  70 6f 6c 65 79 0d 01 68  |LDR R1,npoley..h|
00000280  11 20 53 55 42 20 52 31  2c 52 31 2c 52 33 0d 01  |. SUB R1,R1,R3..|
00000290  72 13 20 53 55 42 20 52  34 2c 52 32 2c 23 31 36  |r. SUB R4,R2,#16|
000002a0  30 0d 01 7c 13 20 53 55  42 20 52 35 2c 52 33 2c  |0..|. SUB R5,R3,|
000002b0  23 31 32 38 0d 01 86 11  20 4d 55 4c 20 52 36 2c  |#128.... MUL R6,|
000002c0  52 30 2c 52 30 0d 01 90  11 20 4d 55 4c 20 52 37  |R0,R0.... MUL R7|
000002d0  2c 52 31 2c 52 31 0d 01  9a 11 20 41 44 44 20 52  |,R1,R1.... ADD R|
000002e0  36 2c 52 36 2c 52 37 0d  01 a4 10 20 43 4d 50 20  |6,R6,R7.... CMP |
000002f0  52 36 2c 23 34 30 30 0d  01 ae 0e 20 42 4c 54 20  |R6,#400.... BLT |
00000300  79 6c 6f 6f 70 0d 01 b8  11 20 4d 55 4c 20 52 37  |yloop.... MUL R7|
00000310  2c 52 34 2c 52 34 0d 01  c2 11 20 4d 55 4c 20 52  |,R4,R4.... MUL R|
00000320  38 2c 52 35 2c 52 35 0d  01 cc 11 20 41 44 44 20  |8,R5,R5.... ADD |
00000330  52 37 2c 52 37 2c 52 38  0d 01 d6 11 20 41 44 44  |R7,R7,R8.... ADD|
00000340  20 52 37 2c 52 37 2c 52  37 0d 01 e0 0e 20 43 4d  | R7,R7,R7.... CM|
00000350  50 20 52 37 2c 23 30 0d  01 ea 0e 20 42 45 51 20  |P R7,#0.... BEQ |
00000360  79 6c 6f 6f 70 0d 01 f4  11 20 4d 55 4c 20 52 38  |yloop.... MUL R8|
00000370  2c 52 30 2c 52 37 0d 01  fe 11 20 4d 55 4c 20 52  |,R0,R7.... MUL R|
00000380  39 2c 52 34 2c 52 36 0d  02 08 11 20 41 44 44 20  |9,R4,R6.... ADD |
00000390  52 38 2c 52 38 2c 52 39  0d 02 12 16 20 4d 4f 56  |R8,R8,R9.... MOV|
000003a0  20 52 38 2c 52 38 2c 4c  53 4c 20 23 31 31 0d 02  | R8,R8,LSL #11..|
000003b0  1c 11 20 4d 55 4c 20 52  39 2c 52 36 2c 52 37 0d  |.. MUL R9,R6,R7.|
000003c0  02 26 18 20 53 54 4d 46  44 20 28 73 70 29 21 2c  |.&. STMFD (sp)!,|
000003d0  7b 52 30 2d 52 37 7d 0d  02 30 0e 20 4d 4f 56 20  |{R0-R7}..0. MOV |
000003e0  52 30 2c 52 38 0d 02 3a  0e 20 4d 4f 56 20 52 31  |R0,R8..:. MOV R1|
000003f0  2c 52 39 0d 02 44 0e 20  42 4c 20 64 69 76 69 64  |,R9..D. BL divid|
00000400  65 0d 02 4e 10 20 53 54  52 20 52 30 2c 78 6f 66  |e..N. STR R0,xof|
00000410  66 0d 02 58 18 20 4c 44  4d 46 44 20 28 73 70 29  |f..X. LDMFD (sp)|
00000420  21 2c 7b 52 30 2d 52 37  7d 0d 02 62 11 20 4d 55  |!,{R0-R7}..b. MU|
00000430  4c 20 52 39 2c 52 31 2c  52 37 0d 02 6c 12 20 4d  |L R9,R1,R7..l. M|
00000440  55 4c 20 52 31 30 2c 52  35 2c 52 36 0d 02 76 12  |UL R10,R5,R6..v.|
00000450  20 41 44 44 20 52 39 2c  52 39 2c 52 31 30 0d 02  | ADD R9,R9,R10..|
00000460  80 16 20 4d 4f 56 20 52  39 2c 52 39 2c 4c 53 4c  |.. MOV R9,R9,LSL|
00000470  20 23 31 31 0d 02 8a 12  20 4d 55 4c 20 52 31 30  | #11.... MUL R10|
00000480  2c 52 36 2c 52 37 0d 02  94 19 20 53 54 4d 46 44  |,R6,R7.... STMFD|
00000490  20 28 73 70 29 21 2c 7b  52 30 2d 52 31 31 7d 0d  | (sp)!,{R0-R11}.|
000004a0  02 9e 0e 20 4d 4f 56 20  52 30 2c 52 39 0d 02 a8  |... MOV R0,R9...|
000004b0  0f 20 4d 4f 56 20 52 31  2c 52 31 30 0d 02 b2 0e  |. MOV R1,R10....|
000004c0  20 42 4c 20 64 69 76 69  64 65 0d 02 bc 10 20 53  | BL divide.... S|
000004d0  54 52 20 52 30 2c 79 6f  66 66 0d 02 c6 10 20 4c  |TR R0,yoff.... L|
000004e0  44 52 20 52 30 2c 78 70  6f 73 0d 02 d0 10 20 4c  |DR R0,xpos.... L|
000004f0  44 52 20 52 31 2c 78 6f  66 66 0d 02 da 14 20 4d  |DR R1,xoff.... M|
00000500  4f 56 20 52 31 2c 52 31  2c 41 53 52 23 32 0d 02  |OV R1,R1,ASR#2..|
00000510  e4 11 20 41 44 44 20 52  30 2c 52 30 2c 52 31 0d  |.. ADD R0,R0,R1.|
00000520  02 ee 10 20 4c 44 52 20  52 31 2c 79 70 6f 73 0d  |... LDR R1,ypos.|
00000530  02 f8 10 20 4c 44 52 20  52 32 2c 79 6f 66 66 0d  |... LDR R2,yoff.|
00000540  02 f9 13 20 52 53 42 20  52 31 2c 52 31 2c 23 32  |... RSB R1,R1,#2|
00000550  35 36 0d 03 0c 14 20 4d  4f 56 20 52 32 2c 52 32  |56.... MOV R2,R2|
00000560  2c 41 53 52 23 32 0d 03  16 11 20 52 53 42 20 52  |,ASR#2.... RSB R|
00000570  32 2c 52 32 2c 23 30 0d  03 20 11 20 41 44 44 20  |2,R2,#0.. . ADD |
00000580  52 31 2c 52 31 2c 52 32  0d 03 2a 10 20 4d 4f 56  |R1,R1,R2..*. MOV|
00000590  20 52 32 2c 23 32 35 35  0d 03 34 0d 20 42 4c 20  | R2,#255..4. BL |
000005a0  70 6c 6f 70 6f 0d 03 35  0b 20 42 20 62 61 63 6b  |plopo..5. B back|
000005b0  0d 03 36 0a 20 2e 62 61  63 6b 0d 03 3e 19 20 4c  |..6. .back..>. L|
000005c0  44 4d 46 44 20 28 73 70  29 21 2c 7b 52 30 2d 52  |DMFD (sp)!,{R0-R|
000005d0  31 31 7d 0d 03 52 0c 20  42 20 79 6c 6f 6f 70 0d  |11}..R. B yloop.|
000005e0  03 5c 09 20 2e 65 6e 64  0d 03 66 0f 20 4d 4f 56  |.\. .end..f. MOV|
000005f0  20 50 43 2c 52 31 32 0d  03 70 11 20 2e 78 70 6f  | PC,R12..p. .xpo|
00000600  73 20 45 51 55 44 20 30  0d 03 7a 11 20 2e 79 70  |s EQUD 0..z. .yp|
00000610  6f 73 20 45 51 55 44 20  30 0d 03 84 11 20 2e 78  |os EQUD 0.... .x|
00000620  6f 66 66 20 45 51 55 44  20 30 0d 03 8e 11 20 2e  |off EQUD 0.... .|
00000630  79 6f 66 66 20 45 51 55  44 20 30 0d 03 98 13 20  |yoff EQUD 0.... |
00000640  2e 6e 70 6f 6c 65 78 20  45 51 55 44 20 30 0d 03  |.npolex EQUD 0..|
00000650  a2 13 20 2e 6e 70 6f 6c  65 79 20 45 51 55 44 20  |.. .npoley EQUD |
00000660  30 0d 03 ac 11 20 2e 62  61 6e 6b 20 45 51 55 44  |0.... .bank EQUD|
00000670  20 31 0d 03 b6 13 20 2e  76 64 75 70 20 45 51 55  | 1.... .vdup EQU|
00000680  44 20 31 34 38 0d 03 c0  0c 20 45 51 55 44 20 2d  |D 148.... EQUD -|
00000690  31 0d 03 ca 10 20 2e 76  64 75 20 45 51 55 44 20  |1.... .vdu EQUD |
000006a0  30 0d 03 d4 0c 20 2e 64  69 76 69 64 65 0d 03 de  |0.... .divide...|
000006b0  22 20 53 54 4d 46 44 20  28 73 70 29 21 2c 7b 72  |" STMFD (sp)!,{r|
000006c0  65 73 75 6c 74 2c 73 69  67 6e 2c 62 69 74 7d 0d  |esult,sign,bit}.|
000006d0  03 e8 12 20 4d 4f 56 20  72 65 73 75 6c 74 2c 23  |... MOV result,#|
000006e0  30 0d 03 f2 0f 20 4d 4f  56 20 62 69 74 2c 23 31  |0.... MOV bit,#1|
000006f0  0d 03 fc 13 20 82 20 73  69 67 6e 2c 74 6f 70 2c  |.... . sign,top,|
00000700  62 6f 74 0d 04 06 0f 20  43 4d 50 20 62 6f 74 2c  |bot.... CMP bot,|
00000710  23 30 0d 04 10 15 20 52  53 42 4d 49 20 62 6f 74  |#0.... RSBMI bot|
00000720  2c 62 6f 74 2c 23 30 0d  04 1a 0f 20 43 4d 50 20  |,bot,#0.... CMP |
00000730  74 6f 70 2c 23 30 0d 04  24 15 20 52 53 42 4d 49  |top,#0..$. RSBMI|
00000740  20 74 6f 70 2c 74 6f 70  2c 23 30 0d 04 2e 12 20  | top,top,#0.... |
00000750  43 4d 50 20 74 6f 70 2c  23 32 5e 32 34 0d 04 38  |CMP top,#2^24..8|
00000760  0e 20 42 4c 54 20 73 6b  69 70 31 0d 04 42 0d 20  |. BLT skip1..B. |
00000770  a4 64 69 76 28 33 31 29  0d 04 4c 0d 20 a4 64 69  |.div(31)..L. .di|
00000780  76 28 33 30 29 0d 04 56  0d 20 a4 64 69 76 28 32  |v(30)..V. .div(2|
00000790  39 29 0d 04 60 0d 20 a4  64 69 76 28 32 38 29 0d  |9)..`. .div(28).|
000007a0  04 6a 0d 20 a4 64 69 76  28 32 37 29 0d 04 74 0d  |.j. .div(27)..t.|
000007b0  20 a4 64 69 76 28 32 36  29 0d 04 7e 0d 20 a4 64  | .div(26)..~. .d|
000007c0  69 76 28 32 35 29 0d 04  88 0b 20 2e 73 6b 69 70  |iv(25).... .skip|
000007d0  31 0d 04 92 12 20 43 4d  50 20 74 6f 70 2c 23 32  |1.... CMP top,#2|
000007e0  5e 31 36 0d 04 9c 0e 20  42 4c 54 20 73 6b 69 70  |^16.... BLT skip|
000007f0  32 0d 04 a6 0d 20 a4 64  69 76 28 32 34 29 0d 04  |2.... .div(24)..|
00000800  b0 0d 20 a4 64 69 76 28  32 33 29 0d 04 ba 0d 20  |.. .div(23).... |
00000810  a4 64 69 76 28 32 32 29  0d 04 c4 0d 20 a4 64 69  |.div(22).... .di|
00000820  76 28 32 31 29 0d 04 ce  0d 20 a4 64 69 76 28 32  |v(21).... .div(2|
00000830  30 29 0d 04 d8 0d 20 a4  64 69 76 28 31 39 29 0d  |0).... .div(19).|
00000840  04 e2 0d 20 a4 64 69 76  28 31 38 29 0d 04 ec 0d  |... .div(18)....|
00000850  20 a4 64 69 76 28 31 37  29 0d 04 f6 0b 20 2e 73  | .div(17).... .s|
00000860  6b 69 70 32 0d 05 00 11  20 43 4d 50 20 74 6f 70  |kip2.... CMP top|
00000870  2c 23 32 5e 38 0d 05 0a  0e 20 42 4c 54 20 73 6b  |,#2^8.... BLT sk|
00000880  69 70 33 0d 05 14 0d 20  a4 64 69 76 28 31 36 29  |ip3.... .div(16)|
00000890  0d 05 1e 0d 20 a4 64 69  76 28 31 35 29 0d 05 28  |.... .div(15)..(|
000008a0  0d 20 a4 64 69 76 28 31  34 29 0d 05 32 0d 20 a4  |. .div(14)..2. .|
000008b0  64 69 76 28 31 33 29 0d  05 3c 0c a4 64 69 76 28  |div(13)..<..div(|
000008c0  31 32 29 0d 05 46 0c a4  64 69 76 28 31 31 29 0d  |12)..F..div(11).|
000008d0  05 50 0c a4 64 69 76 28  31 30 29 0d 05 5a 0b a4  |.P..div(10)..Z..|
000008e0  64 69 76 28 39 29 0d 05  64 0b a4 64 69 76 28 38  |div(9)..d..div(8|
000008f0  29 0d 05 6e 0b 20 2e 73  6b 69 70 33 0d 05 78 0c  |)..n. .skip3..x.|
00000900  20 a4 64 69 76 28 37 29  0d 05 82 0c 20 a4 64 69  | .div(7).... .di|
00000910  76 28 36 29 0d 05 8c 0c  20 a4 64 69 76 28 35 29  |v(6).... .div(5)|
00000920  0d 05 96 0c 20 a4 64 69  76 28 34 29 0d 05 a0 0c  |.... .div(4)....|
00000930  20 a4 64 69 76 28 33 29  0d 05 aa 0c 20 a4 64 69  | .div(3).... .di|
00000940  76 28 32 29 0d 05 b4 0c  20 a4 64 69 76 28 31 29  |v(2).... .div(1)|
00000950  0d 05 be 0c 20 a4 64 69  76 28 30 29 0d 05 c8 0d  |.... .div(0)....|
00000960  20 2e 64 6f 6e 65 64 69  76 0d 05 d2 13 20 4d 4f  | .donediv.... MO|
00000970  56 20 74 6f 70 2c 72 65  73 75 6c 74 0d 05 dc 10  |V top,result....|
00000980  20 43 4d 50 20 73 69 67  6e 2c 23 30 0d 05 e6 15  | CMP sign,#0....|
00000990  20 52 53 42 4d 49 20 74  6f 70 2c 74 6f 70 2c 23  | RSBMI top,top,#|
000009a0  30 0d 05 f0 22 20 4c 44  4d 46 44 20 28 73 70 29  |0..." LDMFD (sp)|
000009b0  21 2c 7b 72 65 73 75 6c  74 2c 73 69 67 6e 2c 62  |!,{result,sign,b|
000009c0  69 74 7d 0d 05 fa 0f 20  4d 4f 56 20 50 43 2c 52  |it}.... MOV PC,R|
000009d0  31 34 0d 06 04 0b 20 2e  6c 69 6e 65 78 0d 06 0e  |14.... .linex...|
000009e0  0e 20 4d 4f 56 20 52 39  2c 52 30 0d 06 18 0e 20  |. MOV R9,R0.... |
000009f0  4d 4f 56 20 52 38 2c 52  31 0d 06 22 0e 20 4d 4f  |MOV R8,R1..". MO|
00000a00  56 20 52 30 2c 52 35 0d  06 2c 0e 20 4d 4f 56 20  |V R0,R5..,. MOV |
00000a10  52 31 2c 52 34 0d 06 36  0f 20 4d 4f 56 20 52 31  |R1,R4..6. MOV R1|
00000a20  31 2c 52 34 0d 06 40 18  20 53 54 4d 46 44 20 28  |1,R4..@. STMFD (|
00000a30  73 70 29 21 2c 7b 52 32  2c 52 33 7d 0d 06 4a 0e  |sp)!,{R2,R3}..J.|
00000a40  20 42 4c 20 64 69 76 69  64 65 0d 06 54 0e 20 4d  | BL divide..T. M|
00000a50  4f 56 20 52 34 2c 52 30  0d 06 5e 12 20 4d 55 4c  |OV R4,R0..^. MUL|
00000a60  20 52 31 2c 52 31 31 2c  52 30 0d 06 68 11 20 53  | R1,R11,R0..h. S|
00000a70  55 42 20 52 35 2c 52 35  2c 52 31 0d 06 72 18 20  |UB R5,R5,R1..r. |
00000a80  4c 44 4d 46 44 20 28 73  70 29 21 2c 7b 52 32 2c  |LDMFD (sp)!,{R2,|
00000a90  52 33 7d 0d 06 7c 0f 20  4d 4f 56 20 52 31 30 2c  |R3}..|. MOV R10,|
00000aa0  23 30 0d 06 86 0e 20 43  4d 50 20 52 33 2c 23 30  |#0.... CMP R3,#0|
00000ab0  0d 06 90 10 20 4d 4f 56  47 54 20 52 36 2c 23 31  |.... MOVGT R6,#1|
00000ac0  0d 06 9a 10 20 4d 56 4e  4c 45 20 52 36 2c 23 30  |.... MVNLE R6,#0|
00000ad0  0d 06 a4 0e 20 43 4d 50  20 52 32 2c 23 30 0d 06  |.... CMP R2,#0..|
00000ae0  ae 10 20 4d 56 4e 4c 45  20 52 37 2c 23 30 0d 06  |.. MVNLE R7,#0..|
00000af0  b8 10 20 4d 4f 56 47 54  20 52 37 2c 23 31 0d 06  |.. MOVGT R7,#1..|
00000b00  c2 11 20 41 44 44 20 52  30 2c 52 38 2c 52 33 0d  |.. ADD R0,R8,R3.|
00000b10  06 cc 11 20 4d 55 4c 20  52 31 2c 52 34 2c 52 37  |... MUL R1,R4,R7|
00000b20  0d 06 d6 0f 20 2e 6c 69  6e 65 78 6c 6f 6f 70 0d  |.... .linexloop.|
00000b30  06 e0 18 20 53 54 4d 46  44 20 28 73 70 29 21 2c  |... STMFD (sp)!,|
00000b40  7b 52 30 2d 52 34 7d 0d  06 ea 0e 20 4d 4f 56 20  |{R0-R4}.... MOV |
00000b50  52 30 2c 52 39 0d 06 f4  0e 20 4d 4f 56 20 52 31  |R0,R9.... MOV R1|
00000b60  2c 52 38 0d 06 fe 10 20  4d 4f 56 20 52 32 2c 23  |,R8.... MOV R2,#|
00000b70  32 35 35 0d 07 08 0d 20  42 4c 20 70 6c 6f 70 6f  |255.... BL plopo|
00000b80  0d 07 12 18 20 4c 44 4d  46 44 20 28 73 70 29 21  |.... LDMFD (sp)!|
00000b90  2c 7b 52 30 2d 52 34 7d  0d 07 1c 0e 20 43 4d 50  |,{R0-R4}.... CMP|
00000ba0  20 52 36 2c 23 30 0d 07  26 10 20 43 4d 50 47 54  | R6,#0..&. CMPGT|
00000bb0  20 52 38 2c 52 30 0d 07  30 0d 20 42 47 45 20 62  | R8,R0..0. BGE b|
00000bc0  61 63 6b 0d 07 3a 0e 20  43 4d 50 20 52 36 2c 23  |ack..:. CMP R6,#|
00000bd0  30 0d 07 44 10 20 43 4d  50 4c 54 20 52 38 2c 52  |0..D. CMPLT R8,R|
00000be0  30 0d 07 4e 0d 20 42 4c  45 20 62 61 63 6b 0d 07  |0..N. BLE back..|
00000bf0  58 11 20 41 44 44 20 52  38 2c 52 38 2c 52 36 0d  |X. ADD R8,R8,R6.|
00000c00  07 62 11 20 41 44 44 20  52 39 2c 52 39 2c 52 31  |.b. ADD R9,R9,R1|
00000c10  0d 07 6c 13 20 41 44 44  20 52 31 30 2c 52 31 30  |..l. ADD R10,R10|
00000c20  2c 52 35 0d 07 76 1c 20  53 54 4d 46 44 20 28 73  |,R5..v. STMFD (s|
00000c30  70 29 21 2c 7b 52 30 2d  52 34 2c 52 31 30 7d 0d  |p)!,{R0-R4,R10}.|
00000c40  07 80 0f 20 4d 4f 56 20  52 30 2c 52 31 30 0d 07  |... MOV R0,R10..|
00000c50  8a 0e 20 4d 4f 56 20 52  31 2c 52 33 0d 07 94 0f  |.. MOV R1,R3....|
00000c60  20 4d 4f 56 20 52 31 31  2c 52 33 0d 07 9e 0e 20  | MOV R11,R3.... |
00000c70  42 4c 20 64 69 76 69 64  65 0d 07 a8 12 20 4d 55  |BL divide.... MU|
00000c80  4c 20 52 31 2c 52 31 31  2c 52 30 0d 07 b2 13 20  |L R1,R11,R0.... |
00000c90  53 55 42 20 52 31 30 2c  52 31 30 2c 52 31 0d 07  |SUB R10,R10,R1..|
00000ca0  bc 0f 20 43 4d 50 20 52  31 30 2c 52 35 0d 07 c6  |.. CMP R10,R5...|
00000cb0  1c 20 4c 44 4d 46 44 20  28 73 70 29 21 2c 7b 52  |. LDMFD (sp)!,{R|
00000cc0  30 2d 52 34 2c 52 31 30  7d 0d 07 d0 13 20 41 44  |0-R4,R10}.... AD|
00000cd0  44 4c 54 20 52 39 2c 52  39 2c 52 37 0d 07 da 10  |DLT R9,R9,R7....|
00000ce0  20 42 20 6c 69 6e 65 78  6c 6f 6f 70 0d 07 e4 0b  | B linexloop....|
00000cf0  20 2e 6c 69 6e 65 79 0d  07 ee 0e 20 4d 4f 56 20  | .liney.... MOV |
00000d00  52 39 2c 52 30 0d 07 f8  0e 20 4d 4f 56 20 52 38  |R9,R0.... MOV R8|
00000d10  2c 52 31 0d 08 02 0e 20  4d 4f 56 20 52 30 2c 52  |,R1.... MOV R0,R|
00000d20  34 0d 08 0c 0e 20 4d 4f  56 20 52 31 2c 52 35 0d  |4.... MOV R1,R5.|
00000d30  08 16 0f 20 4d 4f 56 20  52 31 31 2c 52 34 0d 08  |... MOV R11,R4..|
00000d40  20 18 20 53 54 4d 46 44  20 28 73 70 29 21 2c 7b  | . STMFD (sp)!,{|
00000d50  52 32 2c 52 33 7d 0d 08  2a 0e 20 42 4c 20 64 69  |R2,R3}..*. BL di|
00000d60  76 69 64 65 0d 08 34 0e  20 4d 4f 56 20 52 34 2c  |vide..4. MOV R4,|
00000d70  52 30 0d 08 3e 11 20 4d  55 4c 20 52 31 2c 52 35  |R0..>. MUL R1,R5|
00000d80  2c 52 30 0d 08 48 12 20  53 55 42 20 52 35 2c 52  |,R0..H. SUB R5,R|
00000d90  31 31 2c 52 31 0d 08 52  18 20 4c 44 4d 46 44 20  |11,R1..R. LDMFD |
00000da0  28 73 70 29 21 2c 7b 52  32 2c 52 33 7d 0d 08 5c  |(sp)!,{R2,R3}..\|
00000db0  0f 20 4d 4f 56 20 52 31  30 2c 23 30 0d 08 66 0e  |. MOV R10,#0..f.|
00000dc0  20 43 4d 50 20 52 33 2c  23 30 0d 08 70 10 20 4d  | CMP R3,#0..p. M|
00000dd0  4f 56 47 54 20 52 36 2c  23 31 0d 08 7a 10 20 4d  |OVGT R6,#1..z. M|
00000de0  56 4e 4c 45 20 52 36 2c  23 30 0d 08 84 0e 20 43  |VNLE R6,#0.... C|
00000df0  4d 50 20 52 32 2c 23 30  0d 08 8e 10 20 4d 56 4e  |MP R2,#0.... MVN|
00000e00  4c 45 20 52 37 2c 23 30  0d 08 98 10 20 4d 4f 56  |LE R7,#0.... MOV|
00000e10  47 54 20 52 37 2c 23 31  0d 08 a2 11 20 41 44 44  |GT R7,#1.... ADD|
00000e20  20 52 30 2c 52 39 2c 52  32 0d 08 ac 11 20 4d 55  | R0,R9,R2.... MU|
00000e30  4c 20 52 31 2c 52 34 2c  52 36 0d 08 b6 0f 20 2e  |L R1,R4,R6.... .|
00000e40  6c 69 6e 65 79 6c 6f 6f  70 0d 08 c0 18 20 53 54  |lineyloop.... ST|
00000e50  4d 46 44 20 28 73 70 29  21 2c 7b 52 30 2d 52 34  |MFD (sp)!,{R0-R4|
00000e60  7d 0d 08 ca 0e 20 4d 4f  56 20 52 30 2c 52 39 0d  |}.... MOV R0,R9.|
00000e70  08 d4 0e 20 4d 4f 56 20  52 31 2c 52 38 0d 08 de  |... MOV R1,R8...|
00000e80  10 20 4d 4f 56 20 52 32  2c 23 32 35 35 0d 08 e8  |. MOV R2,#255...|
00000e90  0d 20 42 4c 20 70 6c 6f  70 6f 0d 08 f2 18 20 4c  |. BL plopo.... L|
00000ea0  44 4d 46 44 20 28 73 70  29 21 2c 7b 52 30 2d 52  |DMFD (sp)!,{R0-R|
00000eb0  34 7d 0d 08 fc 0e 20 43  4d 50 20 52 37 2c 23 30  |4}.... CMP R7,#0|
00000ec0  0d 09 06 10 20 43 4d 50  47 54 20 52 39 2c 52 30  |.... CMPGT R9,R0|
00000ed0  0d 09 10 0d 20 42 47 45  20 62 61 63 6b 0d 09 1a  |.... BGE back...|
00000ee0  0e 20 43 4d 50 20 52 37  2c 23 30 0d 09 24 10 20  |. CMP R7,#0..$. |
00000ef0  43 4d 50 4c 54 20 52 39  2c 52 30 0d 09 2e 0d 20  |CMPLT R9,R0.... |
00000f00  42 4c 45 20 62 61 63 6b  0d 09 38 11 20 41 44 44  |BLE back..8. ADD|
00000f10  20 52 39 2c 52 39 2c 52  37 0d 09 42 11 20 41 44  | R9,R9,R7..B. AD|
00000f20  44 20 52 38 2c 52 38 2c  52 31 0d 09 4c 13 20 41  |D R8,R8,R1..L. A|
00000f30  44 44 20 52 31 30 2c 52  31 30 2c 52 35 0d 09 56  |DD R10,R10,R5..V|
00000f40  1c 20 53 54 4d 46 44 20  28 73 70 29 21 2c 7b 52  |. STMFD (sp)!,{R|
00000f50  30 2d 52 34 2c 52 31 30  7d 0d 09 60 0f 20 4d 4f  |0-R4,R10}..`. MO|
00000f60  56 20 52 30 2c 52 31 30  0d 09 6a 0e 20 4d 4f 56  |V R0,R10..j. MOV|
00000f70  20 52 31 2c 52 32 0d 09  74 0f 20 4d 4f 56 20 52  | R1,R2..t. MOV R|
00000f80  31 31 2c 52 32 0d 09 7e  0e 20 42 4c 20 64 69 76  |11,R2..~. BL div|
00000f90  69 64 65 0d 09 88 12 20  4d 55 4c 20 52 31 2c 52  |ide.... MUL R1,R|
00000fa0  31 31 2c 52 30 0d 09 92  13 20 53 55 42 20 52 31  |11,R0.... SUB R1|
00000fb0  30 2c 52 31 30 2c 52 31  0d 09 9c 0f 20 43 4d 50  |0,R10,R1.... CMP|
00000fc0  20 52 31 30 2c 52 35 0d  09 a6 1c 20 4c 44 4d 46  | R10,R5.... LDMF|
00000fd0  44 20 28 73 70 29 21 2c  7b 52 30 2d 52 34 2c 52  |D (sp)!,{R0-R4,R|
00000fe0  31 30 7d 0d 09 b0 13 20  41 44 44 4c 54 20 52 38  |10}.... ADDLT R8|
00000ff0  2c 52 38 2c 52 36 0d 09  ba 10 20 42 20 6c 69 6e  |,R8,R6.... B lin|
00001000  65 79 6c 6f 6f 70 0d 09  c4 0b 20 2e 70 6c 6f 70  |eyloop.... .plop|
00001010  6f 0d 09 ce 0e 20 43 4d  50 20 52 31 2c 23 30 0d  |o.... CMP R1,#0.|
00001020  09 d8 11 20 4d 4f 56 4c  54 20 50 43 2c 52 31 34  |... MOVLT PC,R14|
00001030  0d 09 e2 10 20 43 4d 50  20 52 31 2c 23 32 35 35  |.... CMP R1,#255|
00001040  0d 09 ec 11 20 4d 4f 56  47 54 20 50 43 2c 52 31  |.... MOVGT PC,R1|
00001050  34 0d 09 f6 0f 20 4c 44  52 20 52 33 2c 76 64 75  |4.... LDR R3,vdu|
00001060  0d 0a 0a 18 20 41 44 44  20 52 33 2c 52 33 2c 52  |.... ADD R3,R3,R|
00001070  31 2c 4c 53 4c 20 23 38  0d 0a 14 18 20 41 44 44  |1,LSL #8.... ADD|
00001080  20 52 33 2c 52 33 2c 52  31 2c 4c 53 4c 20 23 36  | R3,R3,R1,LSL #6|
00001090  0d 0a 1e 14 20 53 54 52  42 20 52 32 2c 5b 52 33  |.... STRB R2,[R3|
000010a0  2c 52 30 5d 0d 0a 28 0f  20 4d 4f 56 20 50 43 2c  |,R0]..(. MOV PC,|
000010b0  52 31 34 0d 0a 32 0a 20  2e 77 61 69 74 0d 0a 3c  |R14..2. .wait..<|
000010c0  0f 20 4d 4f 56 20 52 30  2c 23 31 39 0d 0a 46 13  |. MOV R0,#19..F.|
000010d0  20 53 57 49 20 22 58 4f  53 5f 42 79 74 65 22 0d  | SWI "XOS_Byte".|
000010e0  0a 50 10 20 4d 4f 56 20  52 30 2c 23 31 31 32 0d  |.P. MOV R0,#112.|
000010f0  0a 5a 10 20 4c 44 52 20  52 31 2c 62 61 6e 6b 0d  |.Z. LDR R1,bank.|
00001100  0a 64 13 20 53 57 49 20  22 58 4f 53 5f 42 79 74  |.d. SWI "XOS_Byt|
00001110  65 22 0d 0a 6e 10 20 4c  44 52 20 52 31 2c 62 61  |e"..n. LDR R1,ba|
00001120  6e 6b 0d 0a 78 11 20 52  53 42 20 72 31 2c 72 31  |nk..x. RSB r1,r1|
00001130  2c 23 33 0d 0a 82 10 20  53 54 52 20 52 31 2c 62  |,#3.... STR R1,b|
00001140  61 6e 6b 0d 0a 8c 10 20  4d 4f 56 20 72 30 2c 23  |ank.... MOV r0,#|
00001150  31 31 33 0d 0a 96 13 20  53 57 49 20 22 58 4f 53  |113.... SWI "XOS|
00001160  5f 42 79 74 65 22 0d 0a  a0 10 20 53 57 49 20 26  |_Byte".... SWI &|
00001170  31 30 30 2b 31 32 0d 0a  a1 1e 20 53 57 49 20 22  |100+12.... SWI "|
00001180  58 4f 53 5f 52 65 61 64  45 73 63 61 70 65 53 74  |XOS_ReadEscapeSt|
00001190  61 74 65 22 0d 0a a2 0e  20 42 43 43 20 73 74 61  |ate".... BCC sta|
000011a0  72 74 0d 0a aa 0f 20 4d  4f 56 20 50 43 2c 52 31  |rt.... MOV PC,R1|
000011b0  32 0d 0a b4 06 20 5d 0d  0a be 06 20 ed 0d 0a c8  |2.... ].... ....|
000011c0  19 20 c8 97 20 c8 93 20  31 36 30 2c 36 34 2c 38  |. .. .. 160,64,8|
000011d0  39 36 2c 38 39 36 0d 0a  d2 09 20 c8 97 20 ee 0d  |96,896.... .. ..|
000011e0  0a dc 0b 20 d6 20 63 6f  64 65 0d 0a f0 06 20 e0  |... . code.... .|
000011f0  0d 0a fa 0f 20 dd 20 a4  64 69 76 28 69 74 29 0d  |.... . .div(it).|
00001200  0b 04 0d 20 e7 20 69 74  3e 30 20 8c 0d 0b 0e 0e  |... . it>0 .....|
00001210  20 5b 4f 50 54 20 70 61  73 73 0d 0b 18 18 20 43  | [OPT pass.... C|
00001220  4d 50 20 62 6f 74 2c 74  6f 70 2c 4c 53 52 20 23  |MP bot,top,LSR #|
00001230  69 74 0d 0b 22 23 20 84  52 4c 45 20 72 65 73 75  |it.."# .RLE resu|
00001240  6c 74 2c 72 65 73 75 6c  74 2c 62 69 74 2c 41 53  |lt,result,bit,AS|
00001250  4c 20 23 69 74 0d 0b 2c  1e 20 53 55 42 4c 45 20  |L #it..,. SUBLE |
00001260  74 6f 70 2c 74 6f 70 2c  62 6f 74 2c 41 53 4c 20  |top,top,bot,ASL |
00001270  23 69 74 0d 0b 36 06 20  5d 0d 0b 40 06 20 cc 0d  |#it..6. ]..@. ..|
00001280  0b 4a 0e 20 5b 4f 50 54  20 70 61 73 73 0d 0b 54  |.J. [OPT pass..T|
00001290  10 20 43 4d 50 20 62 6f  74 2c 74 6f 70 0d 0b 5e  |. CMP bot,top..^|
000012a0  1a 20 84 52 4c 45 20 72  65 73 75 6c 74 2c 72 65  |. .RLE result,re|
000012b0  73 75 6c 74 2c 23 31 0d  0b 68 16 20 53 55 42 4c  |sult,#1..h. SUBL|
000012c0  45 20 74 6f 70 2c 74 6f  70 2c 62 6f 74 0d 0b 72  |E top,top,bot..r|
000012d0  06 20 5d 0d 0b 7c 06 20  cd 0d 0b 86 08 20 3d 22  |. ]..|. ..... ="|
000012e0  22 0d ff                                          |"..|
000012e3