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

Regulars/StarInfo/Fernando/IronFile2

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

 � >IronFile2
 �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
n MOV R12,R14
x .start
� SWI "OS_Mouse"
� 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
6 .yloop
@ CMP R3,#240
J BGT xloop
T ADD R3,R3,#8
^ STR R2,xpos
h STR R3,ypos
r LDR R1,npoley
| SUB R1,R1,R3
� 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
0 MUL R9,R6,R7
: STMFD (sp)!,{R0-R7}
D MOV R0,R8
N MOV R1,R9
X BL divide
b STR R0,xoff
l LDMFD (sp)!,{R0-R7}
v MUL R9,R1,R7
� MUL R10,R5,R6
� 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,ypos
� RSB R1,R1,#256
� LDR R2,xoff
 LDR R3,yoff
 RSB R3,R3,#0
 MOV R2,R2,ASR #2
  MOV R3,R3,ASR #2
* MOVS R4,R3
4 RSBMI R4,R3,#0
> MOVS R5,R2
H RSBMI R5,R2,#0
R ADD R11,R4,R5
\ CMP R11,#0
f �Q R2,#255
p BLEQ plopo
z CMP R11,#0
�
 BEQ back
� CMP R4,R5
� BGT linex
� BLE liney
�
 .back
� LDMFD (sp)!,{R0-R11}
� B yloop
�	 .end
� MOV PC,R12
� .xpos EQUD 0
� .ypos EQUD 0
� .xoff EQUD 0
� .yoff EQUD 0
 .npolex EQUD 0
 .npoley EQUD 0
 .bank EQUD 1
$ .vdup EQUD 148
. EQUD -1
8 .vdu EQUD 0
B .divide
L" STMFD (sp)!,{result,sign,bit}
V MOV result,#0
` MOV bit,#1
j � sign,top,bot
t CMP bot,#0
~ RSBMI bot,bot,#0
� CMP top,#0
� RSBMI top,top,#0
� CMP top,#2^24
� BLT skip1
�
 �div(31)
�
 �div(30)
�
 �div(29)
�
 �div(28)
�
 �div(27)
�
 �div(26)
�
 �div(25)
� .skip1
 CMP top,#2^16

 BLT skip2

 �div(24)

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