Home » Archimedes archive » Acorn User » Acorn User - Updated Shareware Collection (1994).adf » Programs » !WelcomeA/Library/Assembler/Misc

!WelcomeA/Library/Assembler/Misc

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 » Archimedes archive » Acorn User » Acorn User - Updated Shareware Collection (1994).adf » Programs
Filename: !WelcomeA/Library/Assembler/Misc
Read OK:
File size: 1CC4 bytes
Load address: 0000
Exec address: 0000
File contents
    1REM>Misc
    2REMProduced by BasCompress v1.31 (18 Jan 1993)
    3DEFFN_Misc_version=43
    4DEFFN_hard_initialise_Misc:LOCALi%,m%,n%:IFFN_LibHandler_version<12THENERROR1,"EIA1"
    5force_local_label$="":default_max_local_labels%=100:DIMArmImm%16:=0
    6DEFFNadrl(cc$,reg%,label%):LOCALoffset%,hi%,lo%,op1%,op2%:cc%=FNcc(cc$):IFpass%AND2=0THEN
    7[OPTpass%:DCD0:DCD0:]
    8ELSE:offset%=label%-P%-8:IFABS(offset%)>65535THENERROR1,"EIA2"
    9lo%=ABS(offset%)AND255:hi%=ABS(offset%)AND65280:IFoffset%>=0THEN
   10op1%=cc%OR(&28f0000+(reg%<<12)+lo%):op2%=cc%OR(&2800c00+(reg%<<16)+(reg%<<12)+(hi%>>8))
   11ELSE:op1%=cc%OR(&24f0000+(reg%<<12)+lo%):op2%=cc%OR(&2400c00+(reg%<<16)+(reg%<<12)+(hi%>>8))
   12ENDIF:[OPTpass%:DCDop1%:DCDop2%:]
   13ENDIF:=0
   14DEFFNadrL(cc$,reg%,label%):LOCALoffset%,hi%,lo%,b%:cc%=FNcc(cc$):IFpass%AND2=0THEN
   15[OPTpass%:DCD0:DCD0:DCD0:]
   16ELSE:offset%=label%-P%-8:IFABS(offset%)>&ffffffTHENERROR1,"EIA3"
   17lo%=ABS(offset%)AND255:hi%=ABS(offset%)AND65280:b%=ABS(offset%)AND&ff0000:IFoffset%>=0THEN
   18[OPTpass%:DCDcc%OR(&28f0000+(reg%<<12)+lo%):DCDcc%OR(&2800c00+(reg%<<16)+(reg%<<12)+(hi%>>8)):DCDcc%OR(&2800800+(reg%<<16)+(reg%<<12)+(b%>>16)):]
   19ELSE:[OPTpass%:DCDcc%OR(&24f0000+(reg%<<12)+lo%):DCDcc%OR(&2400c00+(reg%<<16)+(reg%<<12)+(hi%>>8)):DCDcc%OR(&2400800+(reg%<<16)+(reg%<<12)+(b%>>16)):]
   20ENDIF
   21ENDIF:=0
   22DEFPROC_initialise_local_labels(max%):LOCALi%:IF(pass%AND2)=0THEN
   23IFmax%<=0THENERROR1,"EIA4"
   24DIMlocal_label_strings$(max%):DIMlocal_label_values%(max%):max_local_labels%=max%:num_local_labels%=0
   25ELSE:IFmax%<>max_local_labels%THENERROR1,"EIA5"
   26IFnum_local_labels%>0THEN
   27FORi%=0TO(num_local_labels%-1):IFINSTR(local_label_strings$(i%)," ")=0THEN
   28local_label_values%(i%)=0
   29ENDIF:NEXTi%
   30ENDIF
   31ENDIF:ENDPROC
   32DEFPROC_declare_local_label(label$,RETURNlabel):LOCALindex%,local$,e$:IF(pass%AND2)=0THEN
   33LOCALERROR:ONERRORLOCALPROC_initialise_local_labels(default_max_local_labels%):force_local_label$=label$
   34index%=local_label_values%(0):RESTOREERROR:IFINSTR(label$," ")<>0THENERROR1,"EIA6"
   35IFNOTFN_find_local_label(label$,index%)THEN
   36PROC_add_local_label(label$,0)
   37ENDIF:label=P%
   38ELSE:IFlabel$=force_local_label$THEN
   39PROC_initialise_local_labels(default_max_local_labels%):force_local_label$=""
   40ENDIF:IFNOTFN_find_local_label(label$,index%)THEN
   41ERROR1,"EIA7 "+label$
   42ENDIF:local$=FN_local_label(label$,index%):IFNOTFN_find_local_label(local$,index%)THENERROR1,"EIA8 "+label$
   43label=local_label_values%(index%)
   44ENDIF:ENDPROC
   45DEFFN_define_local_label(label$):LOCALindex%,root_index%,local$,e$:IFNOTFN_find_local_label(label$,index%)THENERROR1,"EIA9 "+label$
   46IF(pass%AND2)=0THEN
   47PROC_add_local_label(FN_local_label(label$,index%),P%):local_label_values%(index%)+=1
   48ELSE:local$=FN_local_label(label$,index%):root_index%=index%:IFNOTFN_find_local_label(local$,index%)THENERROR1,"EIA10 "+label$
   49IFlocal_label_values%(index%)<>P%THENERROR1,"EIA11 "+label$
   50local_label_values%(root_index%)+=1
   51ENDIF:=0
   52DEFPROC_add_local_label(label$,value%):LOCALe$:IFnum_local_labels%=max_local_labels%THENERROR1,"EIA12"
   53local_label_strings$(num_local_labels%)=label$:local_label_values%(num_local_labels%)=value%:num_local_labels%+=1:ENDPROC
   54DEFFN_local_label(label$,index%):=label$+" "+STR$(local_label_values%(index%))
   55DEFFN_find_local_label(label$,RETURNindex%):LOCALfound%:found%=FALSE:index%=0:WHILEindex%<num_local_labels%ANDNOTfound%:found%=(label$=local_label_strings$(index%)):IFNOTfound%THEN
   56index%+=1
   57ENDIF:ENDWHILE:=found%
   58DEFFN_ror(x%,shift%):shift%=shift%MOD32:=(x%>>>shift%)OR((((1<<shift%)-1)ANDx%)<<(32-shift%))
   59DEFFN_rol(x%,shift%):shift%=shift%MOD32:=(x%<<shift%)OR(((NOT((-1)>>>shift%))ANDx%)>>>(32-shift%))
   60DEFPROC_Define_Local_Variables(f$):LOCALoP%,oO%,opass%:oP%=P%:oO%=O%:opass%=pass%:IF(pass%AND4)=0THEN
   61O%=P%
   62ENDIF:P%=0:pass%=pass%OR6:P%=FNeval("FN_Declare_Local_Variables_"+f$):P%=oP%:O%=oO%:pass%=opass%:ENDPROC
   63DEFFNError(RETURNaddr%,number%,message$):=FNErrorBlock(addr%,number%,message$)
   64DEFFNErrorBlock(RETURNaddr%,number%,message$):[OPTpass%:ALIGN:.addr%DCDnumber%:EQUS message$:DCB0:ALIGN:]:=0
   65DEFPROCcc(cc$,n%):LOCALp%,cc%:IFcc$<>""THEN
   66cc%=FNcc(cc$):p%=FNaadr(P%):FORi%=1TOn%:p%-=4:!p%=(!p%AND&fffffff)+cc%:NEXTi%
   67ENDIF:ENDPROC
   68DEFFNcc(cc$):LOCALcc%:CASEcc$OF
   69WHEN"","  ":cc%=14
   70WHEN"lo":cc%=3
   71WHEN"hs":cc%=2
   72OTHERWISE:cc%=INSTR("eqnecsccmiplvsvchilsgeltgtlealnv",cc$):IF(cc%MOD2)=0THENERROR1,"EIA13"
   73cc%=(cc%-1)>>1
   74ENDCASE:=cc%<<28
   75DEFFNarmimm(x%,RETURNm%()):SYS&dcb92,x%,ArmImm%TOx%:m%(0)=!ArmImm%:m%(1)=ArmImm%!4:m%(2)=ArmImm%!8:m%(3)=ArmImm%!12:=x%
   76DEFFNSubtractImmediate(cc$,m%,n%,x%,set_psr%):LOCALm%(),i%,j%:DIMm%(4):i%=FNarmimm(ABS(x%),m%()):j%=i%:IFx%<0THEN
   77WHILEi%>1:i%-=1:[OPTpass%:ADD m%,n%,#m%(i%):]:n%=m%:ENDWHILE:[OPTpass%:ADD m%,n%,#m%(0):]
   78ELSE:WHILEi%>1:i%-=1:[OPTpass%:SUB m%,n%,#m%(i%):]:n%=m%:ENDWHILE:[OPTpass%:SUB m%,n%,#m%(0):]
   79ENDIF:IFset_psr%THEN
   80IFpass%AND4THENm%=O%ELSEm%=P%
   81m%!-4+=1<<20
   82ENDIF:PROCcc(cc$,j%):=0
   83DEFFNAddImmediate(cc$,m%,n%,x%,set_psr%):=FNSubtractImmediate(cc$,m%,n%,-x%,set_psr%)
   84DEFFNAddI(cc$,m%,n%,x%):=FNSubtractImmediate(cc$,m%,n%,-x%,FALSE)
   85DEFFNAddIS(cc$,m%,n%,x%):=FNSubtractImmediate(cc$,m%,n%,-x%,TRUE)
   86DEFFNsetPSR_V[OPTpass%:CMP pc,#&80000000:]:=0
   87DEFFNadrf(cc$,reg%,label%):label%-=P%+8:IFlabel%>=0THENERROR1,"EIA14"
   88=FNSubtractImmediate(cc$,reg%,15,-label%,set_psr%)
   89DEFFNunion_start:__union_P%=P%:__union_max%=0:=0
   90DEFFNunion:LOCALa%:a%=P%-__union_P%:IFa%>__union_max%THEN__union_max%=a%
   91P%=__union_P%:O%-=a%:=__union_max%
   92DEFFNunion_end:P%=__union_P%+FNunion:=0
   93DEFFNr(n%):P%+=n%:O%+=n%:=0
   94DEFFNtolower(r%,t%):[OPTpass%:SUB t%,r%,#65:CMP t%,#26:ADDlo r%,r%,#32:]:=0
   95DEFFNo(a$):PRINT"Debugging: ";a$;" ... ";GET:=0
   96DEFFNdivrem(rc%,ra%,rb%,rtemp%):LOCALloop:[OPTpass%:MOV rtemp%,rb%:CMP rtemp%,ra%,LSR#1:.loop MOVls rtemp%,rtemp%,LSL#1:CMPls rtemp%,ra%,LSR#1:Bls loop:MOV rc%,#0:.loop CMP ra%,rtemp%:SUBcs ra%,ra%,rtemp%:ADC rc%,rc%,rc%:MOV rtemp%,rtemp%,LSR#1
   97CMP rtemp%,rb%:Bcs loop:]:=0
   98DEFFNaadr(a%):IF(pass%AND4)THENa%+=code%
   99=a%
  100DEFFNaoff(a%):IF(pass%AND4)=0THENa%-=code%
  101=a%
  102DEFFNmov(cc$,rd%,x%):LOCALm%(),n%(),i%,j%,s%:DIMm%(4):i%=FNarmimm(x%,m%()):IFi%>1THEN
  103DIMn%(4):j%=FNarmimm(NOTx%,n%()):IFj%<i%THEN
  104s%=TRUE:i%=j%:[OPTpass%:MVN rd%,#n%(0):]:WHILEj%>1:j%-=1:[OPTpass%:BIC rd%,rd%,#n%(j%):]:ENDWHILE
  105ENDIF
  106ENDIF:j%=i%:IFNOTs%THEN
  107[OPTpass%:MOV rd%,#m%(0):]:WHILEi%>1:i%-=1:[OPTpass%:ORR rd%,rd%,#m%(i%):]:ENDWHILE
  108ENDIF:IFLEN(cc$)MOD2THEN
  109!FNaadr(P%-4)+=1<<20:cc$=LEFT$(cc$,LEN(cc$)-1)
  110ENDIF:IFcc$<>""THENPROCcc(cc$,j%)
  111=0
  112DEFFNgb(cc$,r%,o%):IFo%<0ORo%>sizeof_GTHENERROR1,"EIA15"
  113=FNAddI(cc$,r%,gb,o%)
  114DEFFNp_uxb(template$):LOCALl_R0,l_lr:[OPTpass%:B (P%+4)+32+((LEN(template$)+4)AND-4):.l_R0 DCD&cbdeadcb:DCD&cbdeadc:DCD&cbdead:DCD&cbdea:DCD52190:DCD3261:.l_lr DCD203:DCD12:EQUS template$:DCB0:ALIGN:STR0,l_R0:ADR0,l_R0:STMIB0,{9-15}:SWI &dcb87:LDR lr,l_lr:]:=0
  115DEFFNadd3(rd%,rn%,x%):IFx%<0THEN
  116[OPTpass%:SUB rd%,rn%,#-x%AND-65536:SUB rd%,rd%,#-x%AND255:SUB rd%,rd%,#-x%AND65280:]
  117ELSE:[OPTpass%:ADD rd%,rn%,#x%AND-65536:ADD rd%,rd%,#x%AND255:ADD rd%,rd%,#x%AND65280:]
  118ENDIF:=0
  119DEFFNmov3(rd%,x%):[OPTpass%:MOV rd%,#x%AND-65536:ORR rd%,rd%,#x%AND255:EOR rd%,rd%,#x%AND65280:]:=0
  120DEFPROCAP:LOCALo%:IFpass%AND2THENo%=50ELSEo%=0
  121SYS&606c4,((FNaadr(P%)-code%)/(L%-code%)*50)+o%:ENDPROC
  122DEFFNldhwq(Rd,Ra,Ri):[OPTpass%:MOVS Rd,Ri,LSR#1:LDR Rd,[Ra,Rd,LSL#2]:MOVcc Rd,Rd,LSL#16:MOV Rd,Rd,ASR#16:]:=0
  123DEFFNldhw(cc$,Rd,Ra,Ri,Rt):IFRt=RaTHEN
  124[OPTpass%:LDRB Rd,[Ra,Ri,LSL#1]!:LDRB Rt,[Ra,#1]:MOV Rt,Rt,LSL#24:ORR Rd,Rd,Rt,ASR#16:]:PROCcc(cc$,4)
  125ELSE:[OPTpass%:ADD Rt,Ra,Ri,LSL#1:LDRB Rd,[Rt,#0]:LDRB Rt,[Rt,#1]:MOV Rt,Rt,LSL#24:ORR Rd,Rd,Rt,ASR#16:]:PROCcc(cc$,5)
  126ENDIF:=0
  127DEFFNlduhwq(Rd,Ra,Ri):[OPTpass%:MOVS Rd,Ri,LSR#1:LDR Rd,[Ra,Rd,LSL#2]:MOVcc Rd,Rd,LSL#16:MOV Rd,Rd,LSR#16:]:=0
  128DEFFNlduhw(cc$,Rd,Ra,Ri,Rt):[OPTpass%:ADD Rt,Ra,Ri,LSL#1:LDRB Rd,[Rt,#0]:LDRB Rt,[Rt,#1]:ORR Rd,Rd,Rt,LSL#8:]:PROCcc(cc$,4):=0
  129DEFFNsthw(cc$,Ra,Ri,Rx,Rt,Ru):IFRt=RaTHEN
  130[OPTpass%:STRB Rx,[Ra,Ri,LSL#1]!:MOV Ru,Rx,LSR#8:STRB Ru,[Ra,#1]:]:PROCcc(cc$,3)
  131ELSE:[OPTpass%:ADD Rt,Ra,Ri,LSL#1:STRB Rx,[Rt,#0]:MOV Ru,Rx,LSR#8:STRB Ru,[Rt,#1]:]:PROCcc(cc$,4)
  132ENDIF:=0

�>Misc
0�Produced by BasCompress v1.31 (18 Jan 1993)
ݤ_Misc_version=43
Hݤ_hard_initialise_Misc:�i%,m%,n%:�_LibHandler_version<12��1,"EIA1"
Eforce_local_label$="":default_max_local_labels%=100:�ArmImm%16:=0
Oݤadrl(cc$,reg%,label%):�offset%,hi%,lo%,op1%,op2%:cc%=�cc(cc$):�pass%�2=0�
[OPTpass%:DCD0:DCD0:]
5�:offset%=label%-P%-8:�(offset%)>65535��1,"EIA2"
	8lo%=�(offset%)�255:hi%=�(offset%)�65280:�offset%>=0�

Yop1%=cc%�(&28f0000+(reg%<<12)+lo%):op2%=cc%�(&2800c00+(reg%<<16)+(reg%<<12)+(hi%>>8))
[�:op1%=cc%�(&24f0000+(reg%<<12)+lo%):op2%=cc%�(&2400c00+(reg%<<16)+(reg%<<12)+(hi%>>8))
!�:[OPTpass%:DCDop1%:DCDop2%:]

�:=0
HݤadrL(cc$,reg%,label%):�offset%,hi%,lo%,b%:cc%=�cc(cc$):�pass%�2=0�
[OPTpass%:DCD0:DCD0:DCD0:]
7�:offset%=label%-P%-8:�(offset%)>&ffffff��1,"EIA3"
Nlo%=�(offset%)�255:hi%=�(offset%)�65280:b%=�(offset%)�&ff0000:�offset%>=0�
�[OPTpass%:DCDcc%�(&28f0000+(reg%<<12)+lo%):DCDcc%�(&2800c00+(reg%<<16)+(reg%<<12)+(hi%>>8)):DCDcc%�(&2800800+(reg%<<16)+(reg%<<12)+(b%>>16)):]
��:[OPTpass%:DCDcc%�(&24f0000+(reg%<<12)+lo%):DCDcc%�(&2400c00+(reg%<<16)+(reg%<<12)+(hi%>>8)):DCDcc%�(&2400800+(reg%<<16)+(reg%<<12)+(b%>>16)):]
�
�:=0
6��_initialise_local_labels(max%):�i%:�(pass%�2)=0�
�max%<=0��1,"EIA4"
e�local_label_strings$(max%):�local_label_values%(max%):max_local_labels%=max%:num_local_labels%=0
(�:�max%<>max_local_labels%��1,"EIA5"
�num_local_labels%>0�
B�i%=0�(num_local_labels%-1):�local_label_strings$(i%)," ")=0�
local_label_values%(i%)=0
	�:�i%
�
�:�
 I��_declare_local_label(label$,�label):�index%,local$,e$:�(pass%�2)=0�
!X�:���_initialise_local_labels(default_max_local_labels%):force_local_label$=label$
"?index%=local_label_values%(0):��:�label$," ")<>0��1,"EIA6"
#(笤_find_local_label(label$,index%)�
$�_add_local_label(label$,0)
%�:label=P%
&!�:�label$=force_local_label$�
'N�_initialise_local_labels(default_max_local_labels%):force_local_label$=""
(*�:笤_find_local_label(label$,index%)�
)�1,"EIA7 "+label$
*_�:local$=�_local_label(label$,index%):笤_find_local_label(local$,index%)��1,"EIA8 "+label$
+%label=local_label_values%(index%)
,�:�
-uݤ_define_local_label(label$):�index%,root_index%,local$,e$:笤_find_local_label(label$,index%)��1,"EIA9 "+label$
.�(pass%�2)=0�
/U�_add_local_label(�_local_label(label$,index%),P%):local_label_values%(index%)+=1
0s�:local$=�_local_label(label$,index%):root_index%=index%:笤_find_local_label(local$,index%)��1,"EIA10 "+label$
17�local_label_values%(index%)<>P%��1,"EIA11 "+label$
2'local_label_values%(root_index%)+=1
3�:=0
4Y��_add_local_label(label$,value%):�e$:�num_local_labels%=max_local_labels%��1,"EIA12"
5wlocal_label_strings$(num_local_labels%)=label$:local_label_values%(num_local_labels%)=value%:num_local_labels%+=1:�
6Lݤ_local_label(label$,index%):=label$+" "+�(local_label_values%(index%))
7�ݤ_find_local_label(label$,�index%):�found%:found%=�:index%=0:ȕindex%<num_local_labels%��found%:found%=(label$=local_label_strings$(index%)):�found%�
8
index%+=1
9�:�:=found%
:Yݤ_ror(x%,shift%):shift%=shift%�32:=(x%>>>shift%)�((((1<<shift%)-1)�x%)<<(32-shift%))
;\ݤ_rol(x%,shift%):shift%=shift%�32:=(x%<<shift%)�(((�((-1)>>>shift%))�x%)>>>(32-shift%))
<Z��_Define_Local_Variables(f$):�oP%,oO%,opass%:oP%=P%:oO%=O%:opass%=pass%:�(pass%�4)=0�
=	O%=P%
>`�:P%=0:pass%=pass%�6:P%=�eval("FN_Declare_Local_Variables_"+f$):P%=oP%:O%=oO%:pass%=opass%:�
?IݤError(�addr%,number%,message$):=�ErrorBlock(addr%,number%,message$)
@hݤErrorBlock(�addr%,number%,message$):[OPTpass%:ALIGN:.addr%DCDnumber%:EQUS message$:DCB0:ALIGN:]:=0
A"��cc(cc$,n%):�p%,cc%:�cc$<>""�
BGcc%=�cc(cc$):p%=�aadr(P%):�i%=1�n%:p%-=4:!p%=(!p%�&fffffff)+cc%:�i%
C�:�
Dݤcc(cc$):�cc%:Ȏcc$�
E�"","  ":cc%=14
F�"lo":cc%=3
G�"hs":cc%=2
HH:cc%=�"eqnecsccmiplvsvchilsgeltgtlealnv",cc$):�(cc%�2)=0��1,"EIA13"
Icc%=(cc%-1)>>1
J�:=cc%<<28
Kqݤarmimm(x%,�m%()):ș&dcb92,x%,ArmImm%�x%:m%(0)=!ArmImm%:m%(1)=ArmImm%!4:m%(2)=ArmImm%!8:m%(3)=ArmImm%!12:=x%
LeݤSubtractImmediate(cc$,m%,n%,x%,set_psr%):�m%(),i%,j%:�m%(4):i%=�armimm(�(x%),m%()):j%=i%:�x%<0�
MSȕi%>1:i%-=1:[OPTpass%:ADD m%,n%,#m%(i%):]:n%=m%:�:[OPTpass%:ADD m%,n%,#m%(0):]
NU�:ȕi%>1:i%-=1:[OPTpass%:SUB m%,n%,#m%(i%):]:n%=m%:�:[OPTpass%:SUB m%,n%,#m%(0):]
O�:�set_psr%�
P�pass%�4�m%=O%�m%=P%
Qm%!-4+=1<<20
R�:�cc(cc$,j%):=0
SUݤAddImmediate(cc$,m%,n%,x%,set_psr%):=�SubtractImmediate(cc$,m%,n%,-x%,set_psr%)
T=ݤAddI(cc$,m%,n%,x%):=�SubtractImmediate(cc$,m%,n%,-x%,�)
U>ݤAddIS(cc$,m%,n%,x%):=�SubtractImmediate(cc$,m%,n%,-x%,�)
V.ݤsetPSR_V[OPTpass%:CMP pc,#&80000000:]:=0
W>ݤadrf(cc$,reg%,label%):label%-=P%+8:�label%>=0��1,"EIA14"
X5=�SubtractImmediate(cc$,reg%,15,-label%,set_psr%)
Y1ݤunion_start:__union_P%=P%:__union_max%=0:=0
ZAݤunion:�a%:a%=P%-__union_P%:�a%>__union_max%�__union_max%=a%
[&P%=__union_P%:O%-=a%:=__union_max%
\'ݤunion_end:P%=__union_P%+�union:=0
]ݤr(n%):P%+=n%:O%+=n%:=0
^Lݤtolower(r%,t%):[OPTpass%:SUB t%,r%,#65:CMP t%,#26:ADDlo r%,r%,#32:]:=0
_*ݤo(a$):�"Debugging: ";a$;" ... ";�:=0
`�ݤdivrem(rc%,ra%,rb%,rtemp%):�loop:[OPTpass%:MOV rtemp%,rb%:CMP rtemp%,ra%,LSR#1:.loop MOVls rtemp%,rtemp%,LSL#1:CMPls rtemp%,ra%,LSR#1:Bls loop:MOV rc%,#0:.loop CMP ra%,rtemp%:SUBcs ra%,ra%,rtemp%:ADC rc%,rc%,rc%:MOV rtemp%,rtemp%,LSR#1
a CMP rtemp%,rb%:Bcs loop:]:=0
b#ݤaadr(a%):�(pass%�4)�a%+=code%
c=a%
d%ݤaoff(a%):�(pass%�4)=0�a%-=code%
e=a%
fKݤmov(cc$,rd%,x%):�m%(),n%(),i%,j%,s%:�m%(4):i%=�armimm(x%,m%()):�i%>1�
g'�n%(4):j%=�armimm(�x%,n%()):�j%<i%�
hXs%=�:i%=j%:[OPTpass%:MVN rd%,#n%(0):]:ȕj%>1:j%-=1:[OPTpass%:BIC rd%,rd%,#n%(j%):]:�
i�
j�:j%=i%:�s%�
kL[OPTpass%:MOV rd%,#m%(0):]:ȕi%>1:i%-=1:[OPTpass%:�R rd%,rd%,#m%(i%):]:�
l�:�(cc$)�2�
m*!�aadr(P%-4)+=1<<20:cc$=�cc$,�(cc$)-1)
n�:�cc$<>""��cc(cc$,j%)
o=0
p0ݤgb(cc$,r%,o%):�o%<0�o%>sizeof_G��1,"EIA15"
q=�AddI(cc$,r%,gb,o%)
r�ݤp_uxb(template$):�l_R0,l_lr:[OPTpass%:B (P%+4)+32+((�(template$)+4)�-4):.l_R0 DCD&cbdeadcb:DCD&cbdeadc:DCD&cbdead:DCD&cbdea:DCD52190:DCD3261:.l_lr DCD203:DCD12:EQUS template$:DCB0:ALIGN:STR0,l_R0:ADR0,l_R0:STMIB0,{9-15}:SWI &dcb87:LDR lr,l_lr:]:=0
sݤadd3(rd%,rn%,x%):�x%<0�
tS[OPTpass%:SUB rd%,rn%,#-x%�-65536:SUB rd%,rd%,#-x%�255:SUB rd%,rd%,#-x%�65280:]
uR�:[OPTpass%:ADD rd%,rn%,#x%�-65536:ADD rd%,rd%,#x%�255:ADD rd%,rd%,#x%�65280:]
v�:=0
w[ݤmov3(rd%,x%):[OPTpass%:MOV rd%,#x%�-65536:�R rd%,rd%,#x%�255:� rd%,rd%,#x%�65280:]:=0
x ��AP:�o%:�pass%�2�o%=50�o%=0
y3ș&606c4,((�aadr(P%)-code%)/(L%-code%)*50)+o%:�
znݤldhwq(Rd,Ra,Ri):[OPTpass%:MOVS Rd,Ri,LSR#1:LDR Rd,[Ra,Rd,LSL#2]:MOVcc Rd,Rd,LSL#16:MOV Rd,Rd,ASR#16:]:=0
{#ݤldhw(cc$,Rd,Ra,Ri,Rt):�Rt=Ra�
|e[OPTpass%:LDRB Rd,[Ra,Ri,LSL#1]!:LDRB Rt,[Ra,#1]:MOV Rt,Rt,LSL#24:�R Rd,Rd,Rt,ASR#16:]:�cc(cc$,4)
}s�:[OPTpass%:ADD Rt,Ra,Ri,LSL#1:LDRB Rd,[Rt,#0]:LDRB Rt,[Rt,#1]:MOV Rt,Rt,LSL#24:�R Rd,Rd,Rt,ASR#16:]:�cc(cc$,5)
~�:=0
oݤlduhwq(Rd,Ra,Ri):[OPTpass%:MOVS Rd,Ri,LSR#1:LDR Rd,[Ra,Rd,LSL#2]:MOVcc Rd,Rd,LSL#16:MOV Rd,Rd,LSR#16:]:=0
�{ݤlduhw(cc$,Rd,Ra,Ri,Rt):[OPTpass%:ADD Rt,Ra,Ri,LSL#1:LDRB Rd,[Rt,#0]:LDRB Rt,[Rt,#1]:�R Rd,Rd,Rt,LSL#8:]:�cc(cc$,4):=0
�&ݤsthw(cc$,Ra,Ri,Rx,Rt,Ru):�Rt=Ra�
�Q[OPTpass%:STRB Rx,[Ra,Ri,LSL#1]!:MOV Ru,Rx,LSR#8:STRB Ru,[Ra,#1]:]:�cc(cc$,3)
�_�:[OPTpass%:ADD Rt,Ra,Ri,LSL#1:STRB Rx,[Rt,#0]:MOV Ru,Rx,LSR#8:STRB Ru,[Rt,#1]:]:�cc(cc$,4)
��:=0
�
00000000  0d 00 01 0a f4 3e 4d 69  73 63 0d 00 02 30 f4 50  |.....>Misc...0.P|
00000010  72 6f 64 75 63 65 64 20  62 79 20 42 61 73 43 6f  |roduced by BasCo|
00000020  6d 70 72 65 73 73 20 76  31 2e 33 31 20 28 31 38  |mpress v1.31 (18|
00000030  20 4a 61 6e 20 31 39 39  33 29 0d 00 03 16 dd a4  | Jan 1993)......|
00000040  5f 4d 69 73 63 5f 76 65  72 73 69 6f 6e 3d 34 33  |_Misc_version=43|
00000050  0d 00 04 48 dd a4 5f 68  61 72 64 5f 69 6e 69 74  |...H.._hard_init|
00000060  69 61 6c 69 73 65 5f 4d  69 73 63 3a ea 69 25 2c  |ialise_Misc:.i%,|
00000070  6d 25 2c 6e 25 3a e7 a4  5f 4c 69 62 48 61 6e 64  |m%,n%:.._LibHand|
00000080  6c 65 72 5f 76 65 72 73  69 6f 6e 3c 31 32 8c 85  |ler_version<12..|
00000090  31 2c 22 45 49 41 31 22  0d 00 05 45 66 6f 72 63  |1,"EIA1"...Eforc|
000000a0  65 5f 6c 6f 63 61 6c 5f  6c 61 62 65 6c 24 3d 22  |e_local_label$="|
000000b0  22 3a 64 65 66 61 75 6c  74 5f 6d 61 78 5f 6c 6f  |":default_max_lo|
000000c0  63 61 6c 5f 6c 61 62 65  6c 73 25 3d 31 30 30 3a  |cal_labels%=100:|
000000d0  de 41 72 6d 49 6d 6d 25  31 36 3a 3d 30 0d 00 06  |.ArmImm%16:=0...|
000000e0  4f dd a4 61 64 72 6c 28  63 63 24 2c 72 65 67 25  |O..adrl(cc$,reg%|
000000f0  2c 6c 61 62 65 6c 25 29  3a ea 6f 66 66 73 65 74  |,label%):.offset|
00000100  25 2c 68 69 25 2c 6c 6f  25 2c 6f 70 31 25 2c 6f  |%,hi%,lo%,op1%,o|
00000110  70 32 25 3a 63 63 25 3d  a4 63 63 28 63 63 24 29  |p2%:cc%=.cc(cc$)|
00000120  3a e7 70 61 73 73 25 80  32 3d 30 8c 0d 00 07 19  |:.pass%.2=0.....|
00000130  5b 4f 50 54 70 61 73 73  25 3a 44 43 44 30 3a 44  |[OPTpass%:DCD0:D|
00000140  43 44 30 3a 5d 0d 00 08  35 cc 3a 6f 66 66 73 65  |CD0:]...5.:offse|
00000150  74 25 3d 6c 61 62 65 6c  25 2d 50 25 2d 38 3a e7  |t%=label%-P%-8:.|
00000160  94 28 6f 66 66 73 65 74  25 29 3e 36 35 35 33 35  |.(offset%)>65535|
00000170  8c 85 31 2c 22 45 49 41  32 22 0d 00 09 38 6c 6f  |..1,"EIA2"...8lo|
00000180  25 3d 94 28 6f 66 66 73  65 74 25 29 80 32 35 35  |%=.(offset%).255|
00000190  3a 68 69 25 3d 94 28 6f  66 66 73 65 74 25 29 80  |:hi%=.(offset%).|
000001a0  36 35 32 38 30 3a e7 6f  66 66 73 65 74 25 3e 3d  |65280:.offset%>=|
000001b0  30 8c 0d 00 0a 59 6f 70  31 25 3d 63 63 25 84 28  |0....Yop1%=cc%.(|
000001c0  26 32 38 66 30 30 30 30  2b 28 72 65 67 25 3c 3c  |&28f0000+(reg%<<|
000001d0  31 32 29 2b 6c 6f 25 29  3a 6f 70 32 25 3d 63 63  |12)+lo%):op2%=cc|
000001e0  25 84 28 26 32 38 30 30  63 30 30 2b 28 72 65 67  |%.(&2800c00+(reg|
000001f0  25 3c 3c 31 36 29 2b 28  72 65 67 25 3c 3c 31 32  |%<<16)+(reg%<<12|
00000200  29 2b 28 68 69 25 3e 3e  38 29 29 0d 00 0b 5b cc  |)+(hi%>>8))...[.|
00000210  3a 6f 70 31 25 3d 63 63  25 84 28 26 32 34 66 30  |:op1%=cc%.(&24f0|
00000220  30 30 30 2b 28 72 65 67  25 3c 3c 31 32 29 2b 6c  |000+(reg%<<12)+l|
00000230  6f 25 29 3a 6f 70 32 25  3d 63 63 25 84 28 26 32  |o%):op2%=cc%.(&2|
00000240  34 30 30 63 30 30 2b 28  72 65 67 25 3c 3c 31 36  |400c00+(reg%<<16|
00000250  29 2b 28 72 65 67 25 3c  3c 31 32 29 2b 28 68 69  |)+(reg%<<12)+(hi|
00000260  25 3e 3e 38 29 29 0d 00  0c 21 cd 3a 5b 4f 50 54  |%>>8))...!.:[OPT|
00000270  70 61 73 73 25 3a 44 43  44 6f 70 31 25 3a 44 43  |pass%:DCDop1%:DC|
00000280  44 6f 70 32 25 3a 5d 0d  00 0d 08 cd 3a 3d 30 0d  |Dop2%:].....:=0.|
00000290  00 0e 48 dd a4 61 64 72  4c 28 63 63 24 2c 72 65  |..H..adrL(cc$,re|
000002a0  67 25 2c 6c 61 62 65 6c  25 29 3a ea 6f 66 66 73  |g%,label%):.offs|
000002b0  65 74 25 2c 68 69 25 2c  6c 6f 25 2c 62 25 3a 63  |et%,hi%,lo%,b%:c|
000002c0  63 25 3d a4 63 63 28 63  63 24 29 3a e7 70 61 73  |c%=.cc(cc$):.pas|
000002d0  73 25 80 32 3d 30 8c 0d  00 0f 1e 5b 4f 50 54 70  |s%.2=0.....[OPTp|
000002e0  61 73 73 25 3a 44 43 44  30 3a 44 43 44 30 3a 44  |ass%:DCD0:DCD0:D|
000002f0  43 44 30 3a 5d 0d 00 10  37 cc 3a 6f 66 66 73 65  |CD0:]...7.:offse|
00000300  74 25 3d 6c 61 62 65 6c  25 2d 50 25 2d 38 3a e7  |t%=label%-P%-8:.|
00000310  94 28 6f 66 66 73 65 74  25 29 3e 26 66 66 66 66  |.(offset%)>&ffff|
00000320  66 66 8c 85 31 2c 22 45  49 41 33 22 0d 00 11 4e  |ff..1,"EIA3"...N|
00000330  6c 6f 25 3d 94 28 6f 66  66 73 65 74 25 29 80 32  |lo%=.(offset%).2|
00000340  35 35 3a 68 69 25 3d 94  28 6f 66 66 73 65 74 25  |55:hi%=.(offset%|
00000350  29 80 36 35 32 38 30 3a  62 25 3d 94 28 6f 66 66  |).65280:b%=.(off|
00000360  73 65 74 25 29 80 26 66  66 30 30 30 30 3a e7 6f  |set%).&ff0000:.o|
00000370  66 66 73 65 74 25 3e 3d  30 8c 0d 00 12 92 5b 4f  |ffset%>=0.....[O|
00000380  50 54 70 61 73 73 25 3a  44 43 44 63 63 25 84 28  |PTpass%:DCDcc%.(|
00000390  26 32 38 66 30 30 30 30  2b 28 72 65 67 25 3c 3c  |&28f0000+(reg%<<|
000003a0  31 32 29 2b 6c 6f 25 29  3a 44 43 44 63 63 25 84  |12)+lo%):DCDcc%.|
000003b0  28 26 32 38 30 30 63 30  30 2b 28 72 65 67 25 3c  |(&2800c00+(reg%<|
000003c0  3c 31 36 29 2b 28 72 65  67 25 3c 3c 31 32 29 2b  |<16)+(reg%<<12)+|
000003d0  28 68 69 25 3e 3e 38 29  29 3a 44 43 44 63 63 25  |(hi%>>8)):DCDcc%|
000003e0  84 28 26 32 38 30 30 38  30 30 2b 28 72 65 67 25  |.(&2800800+(reg%|
000003f0  3c 3c 31 36 29 2b 28 72  65 67 25 3c 3c 31 32 29  |<<16)+(reg%<<12)|
00000400  2b 28 62 25 3e 3e 31 36  29 29 3a 5d 0d 00 13 94  |+(b%>>16)):]....|
00000410  cc 3a 5b 4f 50 54 70 61  73 73 25 3a 44 43 44 63  |.:[OPTpass%:DCDc|
00000420  63 25 84 28 26 32 34 66  30 30 30 30 2b 28 72 65  |c%.(&24f0000+(re|
00000430  67 25 3c 3c 31 32 29 2b  6c 6f 25 29 3a 44 43 44  |g%<<12)+lo%):DCD|
00000440  63 63 25 84 28 26 32 34  30 30 63 30 30 2b 28 72  |cc%.(&2400c00+(r|
00000450  65 67 25 3c 3c 31 36 29  2b 28 72 65 67 25 3c 3c  |eg%<<16)+(reg%<<|
00000460  31 32 29 2b 28 68 69 25  3e 3e 38 29 29 3a 44 43  |12)+(hi%>>8)):DC|
00000470  44 63 63 25 84 28 26 32  34 30 30 38 30 30 2b 28  |Dcc%.(&2400800+(|
00000480  72 65 67 25 3c 3c 31 36  29 2b 28 72 65 67 25 3c  |reg%<<16)+(reg%<|
00000490  3c 31 32 29 2b 28 62 25  3e 3e 31 36 29 29 3a 5d  |<12)+(b%>>16)):]|
000004a0  0d 00 14 05 cd 0d 00 15  08 cd 3a 3d 30 0d 00 16  |..........:=0...|
000004b0  36 dd f2 5f 69 6e 69 74  69 61 6c 69 73 65 5f 6c  |6.._initialise_l|
000004c0  6f 63 61 6c 5f 6c 61 62  65 6c 73 28 6d 61 78 25  |ocal_labels(max%|
000004d0  29 3a ea 69 25 3a e7 28  70 61 73 73 25 80 32 29  |):.i%:.(pass%.2)|
000004e0  3d 30 8c 0d 00 17 16 e7  6d 61 78 25 3c 3d 30 8c  |=0......max%<=0.|
000004f0  85 31 2c 22 45 49 41 34  22 0d 00 18 65 de 6c 6f  |.1,"EIA4"...e.lo|
00000500  63 61 6c 5f 6c 61 62 65  6c 5f 73 74 72 69 6e 67  |cal_label_string|
00000510  73 24 28 6d 61 78 25 29  3a de 6c 6f 63 61 6c 5f  |s$(max%):.local_|
00000520  6c 61 62 65 6c 5f 76 61  6c 75 65 73 25 28 6d 61  |label_values%(ma|
00000530  78 25 29 3a 6d 61 78 5f  6c 6f 63 61 6c 5f 6c 61  |x%):max_local_la|
00000540  62 65 6c 73 25 3d 6d 61  78 25 3a 6e 75 6d 5f 6c  |bels%=max%:num_l|
00000550  6f 63 61 6c 5f 6c 61 62  65 6c 73 25 3d 30 0d 00  |ocal_labels%=0..|
00000560  19 28 cc 3a e7 6d 61 78  25 3c 3e 6d 61 78 5f 6c  |.(.:.max%<>max_l|
00000570  6f 63 61 6c 5f 6c 61 62  65 6c 73 25 8c 85 31 2c  |ocal_labels%..1,|
00000580  22 45 49 41 35 22 0d 00  1a 19 e7 6e 75 6d 5f 6c  |"EIA5".....num_l|
00000590  6f 63 61 6c 5f 6c 61 62  65 6c 73 25 3e 30 8c 0d  |ocal_labels%>0..|
000005a0  00 1b 42 e3 69 25 3d 30  b8 28 6e 75 6d 5f 6c 6f  |..B.i%=0.(num_lo|
000005b0  63 61 6c 5f 6c 61 62 65  6c 73 25 2d 31 29 3a e7  |cal_labels%-1):.|
000005c0  a7 6c 6f 63 61 6c 5f 6c  61 62 65 6c 5f 73 74 72  |.local_label_str|
000005d0  69 6e 67 73 24 28 69 25  29 2c 22 20 22 29 3d 30  |ings$(i%)," ")=0|
000005e0  8c 0d 00 1c 1d 6c 6f 63  61 6c 5f 6c 61 62 65 6c  |.....local_label|
000005f0  5f 76 61 6c 75 65 73 25  28 69 25 29 3d 30 0d 00  |_values%(i%)=0..|
00000600  1d 09 cd 3a ed 69 25 0d  00 1e 05 cd 0d 00 1f 07  |...:.i%.........|
00000610  cd 3a e1 0d 00 20 49 dd  f2 5f 64 65 63 6c 61 72  |.:... I.._declar|
00000620  65 5f 6c 6f 63 61 6c 5f  6c 61 62 65 6c 28 6c 61  |e_local_label(la|
00000630  62 65 6c 24 2c f8 6c 61  62 65 6c 29 3a ea 69 6e  |bel$,.label):.in|
00000640  64 65 78 25 2c 6c 6f 63  61 6c 24 2c 65 24 3a e7  |dex%,local$,e$:.|
00000650  28 70 61 73 73 25 80 32  29 3d 30 8c 0d 00 21 58  |(pass%.2)=0...!X|
00000660  ea 85 3a ee 85 ea f2 5f  69 6e 69 74 69 61 6c 69  |..:...._initiali|
00000670  73 65 5f 6c 6f 63 61 6c  5f 6c 61 62 65 6c 73 28  |se_local_labels(|
00000680  64 65 66 61 75 6c 74 5f  6d 61 78 5f 6c 6f 63 61  |default_max_loca|
00000690  6c 5f 6c 61 62 65 6c 73  25 29 3a 66 6f 72 63 65  |l_labels%):force|
000006a0  5f 6c 6f 63 61 6c 5f 6c  61 62 65 6c 24 3d 6c 61  |_local_label$=la|
000006b0  62 65 6c 24 0d 00 22 3f  69 6e 64 65 78 25 3d 6c  |bel$.."?index%=l|
000006c0  6f 63 61 6c 5f 6c 61 62  65 6c 5f 76 61 6c 75 65  |ocal_label_value|
000006d0  73 25 28 30 29 3a f7 85  3a e7 a7 6c 61 62 65 6c  |s%(0):..:..label|
000006e0  24 2c 22 20 22 29 3c 3e  30 8c 85 31 2c 22 45 49  |$," ")<>0..1,"EI|
000006f0  41 36 22 0d 00 23 28 e7  ac a4 5f 66 69 6e 64 5f  |A6"..#(..._find_|
00000700  6c 6f 63 61 6c 5f 6c 61  62 65 6c 28 6c 61 62 65  |local_label(labe|
00000710  6c 24 2c 69 6e 64 65 78  25 29 8c 0d 00 24 1f f2  |l$,index%)...$..|
00000720  5f 61 64 64 5f 6c 6f 63  61 6c 5f 6c 61 62 65 6c  |_add_local_label|
00000730  28 6c 61 62 65 6c 24 2c  30 29 0d 00 25 0e cd 3a  |(label$,0)..%..:|
00000740  6c 61 62 65 6c 3d 50 25  0d 00 26 21 cc 3a e7 6c  |label=P%..&!.:.l|
00000750  61 62 65 6c 24 3d 66 6f  72 63 65 5f 6c 6f 63 61  |abel$=force_loca|
00000760  6c 5f 6c 61 62 65 6c 24  8c 0d 00 27 4e f2 5f 69  |l_label$...'N._i|
00000770  6e 69 74 69 61 6c 69 73  65 5f 6c 6f 63 61 6c 5f  |nitialise_local_|
00000780  6c 61 62 65 6c 73 28 64  65 66 61 75 6c 74 5f 6d  |labels(default_m|
00000790  61 78 5f 6c 6f 63 61 6c  5f 6c 61 62 65 6c 73 25  |ax_local_labels%|
000007a0  29 3a 66 6f 72 63 65 5f  6c 6f 63 61 6c 5f 6c 61  |):force_local_la|
000007b0  62 65 6c 24 3d 22 22 0d  00 28 2a cd 3a e7 ac a4  |bel$=""..(*.:...|
000007c0  5f 66 69 6e 64 5f 6c 6f  63 61 6c 5f 6c 61 62 65  |_find_local_labe|
000007d0  6c 28 6c 61 62 65 6c 24  2c 69 6e 64 65 78 25 29  |l(label$,index%)|
000007e0  8c 0d 00 29 15 85 31 2c  22 45 49 41 37 20 22 2b  |...)..1,"EIA7 "+|
000007f0  6c 61 62 65 6c 24 0d 00  2a 5f cd 3a 6c 6f 63 61  |label$..*_.:loca|
00000800  6c 24 3d a4 5f 6c 6f 63  61 6c 5f 6c 61 62 65 6c  |l$=._local_label|
00000810  28 6c 61 62 65 6c 24 2c  69 6e 64 65 78 25 29 3a  |(label$,index%):|
00000820  e7 ac a4 5f 66 69 6e 64  5f 6c 6f 63 61 6c 5f 6c  |..._find_local_l|
00000830  61 62 65 6c 28 6c 6f 63  61 6c 24 2c 69 6e 64 65  |abel(local$,inde|
00000840  78 25 29 8c 85 31 2c 22  45 49 41 38 20 22 2b 6c  |x%)..1,"EIA8 "+l|
00000850  61 62 65 6c 24 0d 00 2b  25 6c 61 62 65 6c 3d 6c  |abel$..+%label=l|
00000860  6f 63 61 6c 5f 6c 61 62  65 6c 5f 76 61 6c 75 65  |ocal_label_value|
00000870  73 25 28 69 6e 64 65 78  25 29 0d 00 2c 07 cd 3a  |s%(index%)..,..:|
00000880  e1 0d 00 2d 75 dd a4 5f  64 65 66 69 6e 65 5f 6c  |...-u.._define_l|
00000890  6f 63 61 6c 5f 6c 61 62  65 6c 28 6c 61 62 65 6c  |ocal_label(label|
000008a0  24 29 3a ea 69 6e 64 65  78 25 2c 72 6f 6f 74 5f  |$):.index%,root_|
000008b0  69 6e 64 65 78 25 2c 6c  6f 63 61 6c 24 2c 65 24  |index%,local$,e$|
000008c0  3a e7 ac a4 5f 66 69 6e  64 5f 6c 6f 63 61 6c 5f  |:..._find_local_|
000008d0  6c 61 62 65 6c 28 6c 61  62 65 6c 24 2c 69 6e 64  |label(label$,ind|
000008e0  65 78 25 29 8c 85 31 2c  22 45 49 41 39 20 22 2b  |ex%)..1,"EIA9 "+|
000008f0  6c 61 62 65 6c 24 0d 00  2e 11 e7 28 70 61 73 73  |label$.....(pass|
00000900  25 80 32 29 3d 30 8c 0d  00 2f 55 f2 5f 61 64 64  |%.2)=0.../U._add|
00000910  5f 6c 6f 63 61 6c 5f 6c  61 62 65 6c 28 a4 5f 6c  |_local_label(._l|
00000920  6f 63 61 6c 5f 6c 61 62  65 6c 28 6c 61 62 65 6c  |ocal_label(label|
00000930  24 2c 69 6e 64 65 78 25  29 2c 50 25 29 3a 6c 6f  |$,index%),P%):lo|
00000940  63 61 6c 5f 6c 61 62 65  6c 5f 76 61 6c 75 65 73  |cal_label_values|
00000950  25 28 69 6e 64 65 78 25  29 2b 3d 31 0d 00 30 73  |%(index%)+=1..0s|
00000960  cc 3a 6c 6f 63 61 6c 24  3d a4 5f 6c 6f 63 61 6c  |.:local$=._local|
00000970  5f 6c 61 62 65 6c 28 6c  61 62 65 6c 24 2c 69 6e  |_label(label$,in|
00000980  64 65 78 25 29 3a 72 6f  6f 74 5f 69 6e 64 65 78  |dex%):root_index|
00000990  25 3d 69 6e 64 65 78 25  3a e7 ac a4 5f 66 69 6e  |%=index%:..._fin|
000009a0  64 5f 6c 6f 63 61 6c 5f  6c 61 62 65 6c 28 6c 6f  |d_local_label(lo|
000009b0  63 61 6c 24 2c 69 6e 64  65 78 25 29 8c 85 31 2c  |cal$,index%)..1,|
000009c0  22 45 49 41 31 30 20 22  2b 6c 61 62 65 6c 24 0d  |"EIA10 "+label$.|
000009d0  00 31 37 e7 6c 6f 63 61  6c 5f 6c 61 62 65 6c 5f  |.17.local_label_|
000009e0  76 61 6c 75 65 73 25 28  69 6e 64 65 78 25 29 3c  |values%(index%)<|
000009f0  3e 50 25 8c 85 31 2c 22  45 49 41 31 31 20 22 2b  |>P%..1,"EIA11 "+|
00000a00  6c 61 62 65 6c 24 0d 00  32 27 6c 6f 63 61 6c 5f  |label$..2'local_|
00000a10  6c 61 62 65 6c 5f 76 61  6c 75 65 73 25 28 72 6f  |label_values%(ro|
00000a20  6f 74 5f 69 6e 64 65 78  25 29 2b 3d 31 0d 00 33  |ot_index%)+=1..3|
00000a30  08 cd 3a 3d 30 0d 00 34  59 dd f2 5f 61 64 64 5f  |..:=0..4Y.._add_|
00000a40  6c 6f 63 61 6c 5f 6c 61  62 65 6c 28 6c 61 62 65  |local_label(labe|
00000a50  6c 24 2c 76 61 6c 75 65  25 29 3a ea 65 24 3a e7  |l$,value%):.e$:.|
00000a60  6e 75 6d 5f 6c 6f 63 61  6c 5f 6c 61 62 65 6c 73  |num_local_labels|
00000a70  25 3d 6d 61 78 5f 6c 6f  63 61 6c 5f 6c 61 62 65  |%=max_local_labe|
00000a80  6c 73 25 8c 85 31 2c 22  45 49 41 31 32 22 0d 00  |ls%..1,"EIA12"..|
00000a90  35 77 6c 6f 63 61 6c 5f  6c 61 62 65 6c 5f 73 74  |5wlocal_label_st|
00000aa0  72 69 6e 67 73 24 28 6e  75 6d 5f 6c 6f 63 61 6c  |rings$(num_local|
00000ab0  5f 6c 61 62 65 6c 73 25  29 3d 6c 61 62 65 6c 24  |_labels%)=label$|
00000ac0  3a 6c 6f 63 61 6c 5f 6c  61 62 65 6c 5f 76 61 6c  |:local_label_val|
00000ad0  75 65 73 25 28 6e 75 6d  5f 6c 6f 63 61 6c 5f 6c  |ues%(num_local_l|
00000ae0  61 62 65 6c 73 25 29 3d  76 61 6c 75 65 25 3a 6e  |abels%)=value%:n|
00000af0  75 6d 5f 6c 6f 63 61 6c  5f 6c 61 62 65 6c 73 25  |um_local_labels%|
00000b00  2b 3d 31 3a e1 0d 00 36  4c dd a4 5f 6c 6f 63 61  |+=1:...6L.._loca|
00000b10  6c 5f 6c 61 62 65 6c 28  6c 61 62 65 6c 24 2c 69  |l_label(label$,i|
00000b20  6e 64 65 78 25 29 3a 3d  6c 61 62 65 6c 24 2b 22  |ndex%):=label$+"|
00000b30  20 22 2b c3 28 6c 6f 63  61 6c 5f 6c 61 62 65 6c  | "+.(local_label|
00000b40  5f 76 61 6c 75 65 73 25  28 69 6e 64 65 78 25 29  |_values%(index%)|
00000b50  29 0d 00 37 9b dd a4 5f  66 69 6e 64 5f 6c 6f 63  |)..7..._find_loc|
00000b60  61 6c 5f 6c 61 62 65 6c  28 6c 61 62 65 6c 24 2c  |al_label(label$,|
00000b70  f8 69 6e 64 65 78 25 29  3a ea 66 6f 75 6e 64 25  |.index%):.found%|
00000b80  3a 66 6f 75 6e 64 25 3d  a3 3a 69 6e 64 65 78 25  |:found%=.:index%|
00000b90  3d 30 3a c8 95 69 6e 64  65 78 25 3c 6e 75 6d 5f  |=0:..index%<num_|
00000ba0  6c 6f 63 61 6c 5f 6c 61  62 65 6c 73 25 80 ac 66  |local_labels%..f|
00000bb0  6f 75 6e 64 25 3a 66 6f  75 6e 64 25 3d 28 6c 61  |ound%:found%=(la|
00000bc0  62 65 6c 24 3d 6c 6f 63  61 6c 5f 6c 61 62 65 6c  |bel$=local_label|
00000bd0  5f 73 74 72 69 6e 67 73  24 28 69 6e 64 65 78 25  |_strings$(index%|
00000be0  29 29 3a e7 ac 66 6f 75  6e 64 25 8c 0d 00 38 0d  |)):..found%...8.|
00000bf0  69 6e 64 65 78 25 2b 3d  31 0d 00 39 0f cd 3a ce  |index%+=1..9..:.|
00000c00  3a 3d 66 6f 75 6e 64 25  0d 00 3a 59 dd a4 5f 72  |:=found%..:Y.._r|
00000c10  6f 72 28 78 25 2c 73 68  69 66 74 25 29 3a 73 68  |or(x%,shift%):sh|
00000c20  69 66 74 25 3d 73 68 69  66 74 25 83 33 32 3a 3d  |ift%=shift%.32:=|
00000c30  28 78 25 3e 3e 3e 73 68  69 66 74 25 29 84 28 28  |(x%>>>shift%).((|
00000c40  28 28 31 3c 3c 73 68 69  66 74 25 29 2d 31 29 80  |((1<<shift%)-1).|
00000c50  78 25 29 3c 3c 28 33 32  2d 73 68 69 66 74 25 29  |x%)<<(32-shift%)|
00000c60  29 0d 00 3b 5c dd a4 5f  72 6f 6c 28 78 25 2c 73  |)..;\.._rol(x%,s|
00000c70  68 69 66 74 25 29 3a 73  68 69 66 74 25 3d 73 68  |hift%):shift%=sh|
00000c80  69 66 74 25 83 33 32 3a  3d 28 78 25 3c 3c 73 68  |ift%.32:=(x%<<sh|
00000c90  69 66 74 25 29 84 28 28  28 ac 28 28 2d 31 29 3e  |ift%).(((.((-1)>|
00000ca0  3e 3e 73 68 69 66 74 25  29 29 80 78 25 29 3e 3e  |>>shift%)).x%)>>|
00000cb0  3e 28 33 32 2d 73 68 69  66 74 25 29 29 0d 00 3c  |>(32-shift%))..<|
00000cc0  5a dd f2 5f 44 65 66 69  6e 65 5f 4c 6f 63 61 6c  |Z.._Define_Local|
00000cd0  5f 56 61 72 69 61 62 6c  65 73 28 66 24 29 3a ea  |_Variables(f$):.|
00000ce0  6f 50 25 2c 6f 4f 25 2c  6f 70 61 73 73 25 3a 6f  |oP%,oO%,opass%:o|
00000cf0  50 25 3d 50 25 3a 6f 4f  25 3d 4f 25 3a 6f 70 61  |P%=P%:oO%=O%:opa|
00000d00  73 73 25 3d 70 61 73 73  25 3a e7 28 70 61 73 73  |ss%=pass%:.(pass|
00000d10  25 80 34 29 3d 30 8c 0d  00 3d 09 4f 25 3d 50 25  |%.4)=0...=.O%=P%|
00000d20  0d 00 3e 60 cd 3a 50 25  3d 30 3a 70 61 73 73 25  |..>`.:P%=0:pass%|
00000d30  3d 70 61 73 73 25 84 36  3a 50 25 3d a4 65 76 61  |=pass%.6:P%=.eva|
00000d40  6c 28 22 46 4e 5f 44 65  63 6c 61 72 65 5f 4c 6f  |l("FN_Declare_Lo|
00000d50  63 61 6c 5f 56 61 72 69  61 62 6c 65 73 5f 22 2b  |cal_Variables_"+|
00000d60  66 24 29 3a 50 25 3d 6f  50 25 3a 4f 25 3d 6f 4f  |f$):P%=oP%:O%=oO|
00000d70  25 3a 70 61 73 73 25 3d  6f 70 61 73 73 25 3a e1  |%:pass%=opass%:.|
00000d80  0d 00 3f 49 dd a4 45 72  72 6f 72 28 f8 61 64 64  |..?I..Error(.add|
00000d90  72 25 2c 6e 75 6d 62 65  72 25 2c 6d 65 73 73 61  |r%,number%,messa|
00000da0  67 65 24 29 3a 3d a4 45  72 72 6f 72 42 6c 6f 63  |ge$):=.ErrorBloc|
00000db0  6b 28 61 64 64 72 25 2c  6e 75 6d 62 65 72 25 2c  |k(addr%,number%,|
00000dc0  6d 65 73 73 61 67 65 24  29 0d 00 40 68 dd a4 45  |message$)..@h..E|
00000dd0  72 72 6f 72 42 6c 6f 63  6b 28 f8 61 64 64 72 25  |rrorBlock(.addr%|
00000de0  2c 6e 75 6d 62 65 72 25  2c 6d 65 73 73 61 67 65  |,number%,message|
00000df0  24 29 3a 5b 4f 50 54 70  61 73 73 25 3a 41 4c 49  |$):[OPTpass%:ALI|
00000e00  47 4e 3a 2e 61 64 64 72  25 44 43 44 6e 75 6d 62  |GN:.addr%DCDnumb|
00000e10  65 72 25 3a 45 51 55 53  20 6d 65 73 73 61 67 65  |er%:EQUS message|
00000e20  24 3a 44 43 42 30 3a 41  4c 49 47 4e 3a 5d 3a 3d  |$:DCB0:ALIGN:]:=|
00000e30  30 0d 00 41 22 dd f2 63  63 28 63 63 24 2c 6e 25  |0..A"..cc(cc$,n%|
00000e40  29 3a ea 70 25 2c 63 63  25 3a e7 63 63 24 3c 3e  |):.p%,cc%:.cc$<>|
00000e50  22 22 8c 0d 00 42 47 63  63 25 3d a4 63 63 28 63  |""...BGcc%=.cc(c|
00000e60  63 24 29 3a 70 25 3d a4  61 61 64 72 28 50 25 29  |c$):p%=.aadr(P%)|
00000e70  3a e3 69 25 3d 31 b8 6e  25 3a 70 25 2d 3d 34 3a  |:.i%=1.n%:p%-=4:|
00000e80  21 70 25 3d 28 21 70 25  80 26 66 66 66 66 66 66  |!p%=(!p%.&ffffff|
00000e90  66 29 2b 63 63 25 3a ed  69 25 0d 00 43 07 cd 3a  |f)+cc%:.i%..C..:|
00000ea0  e1 0d 00 44 19 dd a4 63  63 28 63 63 24 29 3a ea  |...D...cc(cc$):.|
00000eb0  63 63 25 3a c8 8e 63 63  24 ca 0d 00 45 13 c9 22  |cc%:..cc$...E.."|
00000ec0  22 2c 22 20 20 22 3a 63  63 25 3d 31 34 0d 00 46  |","  ":cc%=14..F|
00000ed0  0f c9 22 6c 6f 22 3a 63  63 25 3d 33 0d 00 47 0f  |.."lo":cc%=3..G.|
00000ee0  c9 22 68 73 22 3a 63 63  25 3d 32 0d 00 48 48 7f  |."hs":cc%=2..HH.|
00000ef0  3a 63 63 25 3d a7 22 65  71 6e 65 63 73 63 63 6d  |:cc%=."eqnecsccm|
00000f00  69 70 6c 76 73 76 63 68  69 6c 73 67 65 6c 74 67  |iplvsvchilsgeltg|
00000f10  74 6c 65 61 6c 6e 76 22  2c 63 63 24 29 3a e7 28  |tlealnv",cc$):.(|
00000f20  63 63 25 83 32 29 3d 30  8c 85 31 2c 22 45 49 41  |cc%.2)=0..1,"EIA|
00000f30  31 33 22 0d 00 49 12 63  63 25 3d 28 63 63 25 2d  |13"..I.cc%=(cc%-|
00000f40  31 29 3e 3e 31 0d 00 4a  0e cb 3a 3d 63 63 25 3c  |1)>>1..J..:=cc%<|
00000f50  3c 32 38 0d 00 4b 71 dd  a4 61 72 6d 69 6d 6d 28  |<28..Kq..armimm(|
00000f60  78 25 2c f8 6d 25 28 29  29 3a c8 99 26 64 63 62  |x%,.m%()):..&dcb|
00000f70  39 32 2c 78 25 2c 41 72  6d 49 6d 6d 25 b8 78 25  |92,x%,ArmImm%.x%|
00000f80  3a 6d 25 28 30 29 3d 21  41 72 6d 49 6d 6d 25 3a  |:m%(0)=!ArmImm%:|
00000f90  6d 25 28 31 29 3d 41 72  6d 49 6d 6d 25 21 34 3a  |m%(1)=ArmImm%!4:|
00000fa0  6d 25 28 32 29 3d 41 72  6d 49 6d 6d 25 21 38 3a  |m%(2)=ArmImm%!8:|
00000fb0  6d 25 28 33 29 3d 41 72  6d 49 6d 6d 25 21 31 32  |m%(3)=ArmImm%!12|
00000fc0  3a 3d 78 25 0d 00 4c 65  dd a4 53 75 62 74 72 61  |:=x%..Le..Subtra|
00000fd0  63 74 49 6d 6d 65 64 69  61 74 65 28 63 63 24 2c  |ctImmediate(cc$,|
00000fe0  6d 25 2c 6e 25 2c 78 25  2c 73 65 74 5f 70 73 72  |m%,n%,x%,set_psr|
00000ff0  25 29 3a ea 6d 25 28 29  2c 69 25 2c 6a 25 3a de  |%):.m%(),i%,j%:.|
00001000  6d 25 28 34 29 3a 69 25  3d a4 61 72 6d 69 6d 6d  |m%(4):i%=.armimm|
00001010  28 94 28 78 25 29 2c 6d  25 28 29 29 3a 6a 25 3d  |(.(x%),m%()):j%=|
00001020  69 25 3a e7 78 25 3c 30  8c 0d 00 4d 53 c8 95 69  |i%:.x%<0...MS..i|
00001030  25 3e 31 3a 69 25 2d 3d  31 3a 5b 4f 50 54 70 61  |%>1:i%-=1:[OPTpa|
00001040  73 73 25 3a 41 44 44 20  6d 25 2c 6e 25 2c 23 6d  |ss%:ADD m%,n%,#m|
00001050  25 28 69 25 29 3a 5d 3a  6e 25 3d 6d 25 3a ce 3a  |%(i%):]:n%=m%:.:|
00001060  5b 4f 50 54 70 61 73 73  25 3a 41 44 44 20 6d 25  |[OPTpass%:ADD m%|
00001070  2c 6e 25 2c 23 6d 25 28  30 29 3a 5d 0d 00 4e 55  |,n%,#m%(0):]..NU|
00001080  cc 3a c8 95 69 25 3e 31  3a 69 25 2d 3d 31 3a 5b  |.:..i%>1:i%-=1:[|
00001090  4f 50 54 70 61 73 73 25  3a 53 55 42 20 6d 25 2c  |OPTpass%:SUB m%,|
000010a0  6e 25 2c 23 6d 25 28 69  25 29 3a 5d 3a 6e 25 3d  |n%,#m%(i%):]:n%=|
000010b0  6d 25 3a ce 3a 5b 4f 50  54 70 61 73 73 25 3a 53  |m%:.:[OPTpass%:S|
000010c0  55 42 20 6d 25 2c 6e 25  2c 23 6d 25 28 30 29 3a  |UB m%,n%,#m%(0):|
000010d0  5d 0d 00 4f 10 cd 3a e7  73 65 74 5f 70 73 72 25  |]..O..:.set_psr%|
000010e0  8c 0d 00 50 18 e7 70 61  73 73 25 80 34 8c 6d 25  |...P..pass%.4.m%|
000010f0  3d 4f 25 8b 6d 25 3d 50  25 0d 00 51 10 6d 25 21  |=O%.m%=P%..Q.m%!|
00001100  2d 34 2b 3d 31 3c 3c 32  30 0d 00 52 14 cd 3a f2  |-4+=1<<20..R..:.|
00001110  63 63 28 63 63 24 2c 6a  25 29 3a 3d 30 0d 00 53  |cc(cc$,j%):=0..S|
00001120  55 dd a4 41 64 64 49 6d  6d 65 64 69 61 74 65 28  |U..AddImmediate(|
00001130  63 63 24 2c 6d 25 2c 6e  25 2c 78 25 2c 73 65 74  |cc$,m%,n%,x%,set|
00001140  5f 70 73 72 25 29 3a 3d  a4 53 75 62 74 72 61 63  |_psr%):=.Subtrac|
00001150  74 49 6d 6d 65 64 69 61  74 65 28 63 63 24 2c 6d  |tImmediate(cc$,m|
00001160  25 2c 6e 25 2c 2d 78 25  2c 73 65 74 5f 70 73 72  |%,n%,-x%,set_psr|
00001170  25 29 0d 00 54 3d dd a4  41 64 64 49 28 63 63 24  |%)..T=..AddI(cc$|
00001180  2c 6d 25 2c 6e 25 2c 78  25 29 3a 3d a4 53 75 62  |,m%,n%,x%):=.Sub|
00001190  74 72 61 63 74 49 6d 6d  65 64 69 61 74 65 28 63  |tractImmediate(c|
000011a0  63 24 2c 6d 25 2c 6e 25  2c 2d 78 25 2c a3 29 0d  |c$,m%,n%,-x%,.).|
000011b0  00 55 3e dd a4 41 64 64  49 53 28 63 63 24 2c 6d  |.U>..AddIS(cc$,m|
000011c0  25 2c 6e 25 2c 78 25 29  3a 3d a4 53 75 62 74 72  |%,n%,x%):=.Subtr|
000011d0  61 63 74 49 6d 6d 65 64  69 61 74 65 28 63 63 24  |actImmediate(cc$|
000011e0  2c 6d 25 2c 6e 25 2c 2d  78 25 2c b9 29 0d 00 56  |,m%,n%,-x%,.)..V|
000011f0  2e dd a4 73 65 74 50 53  52 5f 56 5b 4f 50 54 70  |...setPSR_V[OPTp|
00001200  61 73 73 25 3a 43 4d 50  20 70 63 2c 23 26 38 30  |ass%:CMP pc,#&80|
00001210  30 30 30 30 30 30 3a 5d  3a 3d 30 0d 00 57 3e dd  |000000:]:=0..W>.|
00001220  a4 61 64 72 66 28 63 63  24 2c 72 65 67 25 2c 6c  |.adrf(cc$,reg%,l|
00001230  61 62 65 6c 25 29 3a 6c  61 62 65 6c 25 2d 3d 50  |abel%):label%-=P|
00001240  25 2b 38 3a e7 6c 61 62  65 6c 25 3e 3d 30 8c 85  |%+8:.label%>=0..|
00001250  31 2c 22 45 49 41 31 34  22 0d 00 58 35 3d a4 53  |1,"EIA14"..X5=.S|
00001260  75 62 74 72 61 63 74 49  6d 6d 65 64 69 61 74 65  |ubtractImmediate|
00001270  28 63 63 24 2c 72 65 67  25 2c 31 35 2c 2d 6c 61  |(cc$,reg%,15,-la|
00001280  62 65 6c 25 2c 73 65 74  5f 70 73 72 25 29 0d 00  |bel%,set_psr%)..|
00001290  59 31 dd a4 75 6e 69 6f  6e 5f 73 74 61 72 74 3a  |Y1..union_start:|
000012a0  5f 5f 75 6e 69 6f 6e 5f  50 25 3d 50 25 3a 5f 5f  |__union_P%=P%:__|
000012b0  75 6e 69 6f 6e 5f 6d 61  78 25 3d 30 3a 3d 30 0d  |union_max%=0:=0.|
000012c0  00 5a 41 dd a4 75 6e 69  6f 6e 3a ea 61 25 3a 61  |.ZA..union:.a%:a|
000012d0  25 3d 50 25 2d 5f 5f 75  6e 69 6f 6e 5f 50 25 3a  |%=P%-__union_P%:|
000012e0  e7 61 25 3e 5f 5f 75 6e  69 6f 6e 5f 6d 61 78 25  |.a%>__union_max%|
000012f0  8c 5f 5f 75 6e 69 6f 6e  5f 6d 61 78 25 3d 61 25  |.__union_max%=a%|
00001300  0d 00 5b 26 50 25 3d 5f  5f 75 6e 69 6f 6e 5f 50  |..[&P%=__union_P|
00001310  25 3a 4f 25 2d 3d 61 25  3a 3d 5f 5f 75 6e 69 6f  |%:O%-=a%:=__unio|
00001320  6e 5f 6d 61 78 25 0d 00  5c 27 dd a4 75 6e 69 6f  |n_max%..\'..unio|
00001330  6e 5f 65 6e 64 3a 50 25  3d 5f 5f 75 6e 69 6f 6e  |n_end:P%=__union|
00001340  5f 50 25 2b a4 75 6e 69  6f 6e 3a 3d 30 0d 00 5d  |_P%+.union:=0..]|
00001350  1c dd a4 72 28 6e 25 29  3a 50 25 2b 3d 6e 25 3a  |...r(n%):P%+=n%:|
00001360  4f 25 2b 3d 6e 25 3a 3d  30 0d 00 5e 4c dd a4 74  |O%+=n%:=0..^L..t|
00001370  6f 6c 6f 77 65 72 28 72  25 2c 74 25 29 3a 5b 4f  |olower(r%,t%):[O|
00001380  50 54 70 61 73 73 25 3a  53 55 42 20 74 25 2c 72  |PTpass%:SUB t%,r|
00001390  25 2c 23 36 35 3a 43 4d  50 20 74 25 2c 23 32 36  |%,#65:CMP t%,#26|
000013a0  3a 41 44 44 6c 6f 20 72  25 2c 72 25 2c 23 33 32  |:ADDlo r%,r%,#32|
000013b0  3a 5d 3a 3d 30 0d 00 5f  2a dd a4 6f 28 61 24 29  |:]:=0.._*..o(a$)|
000013c0  3a f1 22 44 65 62 75 67  67 69 6e 67 3a 20 22 3b  |:."Debugging: ";|
000013d0  61 24 3b 22 20 2e 2e 2e  20 22 3b a5 3a 3d 30 0d  |a$;" ... ";.:=0.|
000013e0  00 60 f1 dd a4 64 69 76  72 65 6d 28 72 63 25 2c  |.`...divrem(rc%,|
000013f0  72 61 25 2c 72 62 25 2c  72 74 65 6d 70 25 29 3a  |ra%,rb%,rtemp%):|
00001400  ea 6c 6f 6f 70 3a 5b 4f  50 54 70 61 73 73 25 3a  |.loop:[OPTpass%:|
00001410  4d 4f 56 20 72 74 65 6d  70 25 2c 72 62 25 3a 43  |MOV rtemp%,rb%:C|
00001420  4d 50 20 72 74 65 6d 70  25 2c 72 61 25 2c 4c 53  |MP rtemp%,ra%,LS|
00001430  52 23 31 3a 2e 6c 6f 6f  70 20 4d 4f 56 6c 73 20  |R#1:.loop MOVls |
00001440  72 74 65 6d 70 25 2c 72  74 65 6d 70 25 2c 4c 53  |rtemp%,rtemp%,LS|
00001450  4c 23 31 3a 43 4d 50 6c  73 20 72 74 65 6d 70 25  |L#1:CMPls rtemp%|
00001460  2c 72 61 25 2c 4c 53 52  23 31 3a 42 6c 73 20 6c  |,ra%,LSR#1:Bls l|
00001470  6f 6f 70 3a 4d 4f 56 20  72 63 25 2c 23 30 3a 2e  |oop:MOV rc%,#0:.|
00001480  6c 6f 6f 70 20 43 4d 50  20 72 61 25 2c 72 74 65  |loop CMP ra%,rte|
00001490  6d 70 25 3a 53 55 42 63  73 20 72 61 25 2c 72 61  |mp%:SUBcs ra%,ra|
000014a0  25 2c 72 74 65 6d 70 25  3a 41 44 43 20 72 63 25  |%,rtemp%:ADC rc%|
000014b0  2c 72 63 25 2c 72 63 25  3a 4d 4f 56 20 72 74 65  |,rc%,rc%:MOV rte|
000014c0  6d 70 25 2c 72 74 65 6d  70 25 2c 4c 53 52 23 31  |mp%,rtemp%,LSR#1|
000014d0  0d 00 61 20 43 4d 50 20  72 74 65 6d 70 25 2c 72  |..a CMP rtemp%,r|
000014e0  62 25 3a 42 63 73 20 6c  6f 6f 70 3a 5d 3a 3d 30  |b%:Bcs loop:]:=0|
000014f0  0d 00 62 23 dd a4 61 61  64 72 28 61 25 29 3a e7  |..b#..aadr(a%):.|
00001500  28 70 61 73 73 25 80 34  29 8c 61 25 2b 3d 63 6f  |(pass%.4).a%+=co|
00001510  64 65 25 0d 00 63 07 3d  61 25 0d 00 64 25 dd a4  |de%..c.=a%..d%..|
00001520  61 6f 66 66 28 61 25 29  3a e7 28 70 61 73 73 25  |aoff(a%):.(pass%|
00001530  80 34 29 3d 30 8c 61 25  2d 3d 63 6f 64 65 25 0d  |.4)=0.a%-=code%.|
00001540  00 65 07 3d 61 25 0d 00  66 4b dd a4 6d 6f 76 28  |.e.=a%..fK..mov(|
00001550  63 63 24 2c 72 64 25 2c  78 25 29 3a ea 6d 25 28  |cc$,rd%,x%):.m%(|
00001560  29 2c 6e 25 28 29 2c 69  25 2c 6a 25 2c 73 25 3a  |),n%(),i%,j%,s%:|
00001570  de 6d 25 28 34 29 3a 69  25 3d a4 61 72 6d 69 6d  |.m%(4):i%=.armim|
00001580  6d 28 78 25 2c 6d 25 28  29 29 3a e7 69 25 3e 31  |m(x%,m%()):.i%>1|
00001590  8c 0d 00 67 27 de 6e 25  28 34 29 3a 6a 25 3d a4  |...g'.n%(4):j%=.|
000015a0  61 72 6d 69 6d 6d 28 ac  78 25 2c 6e 25 28 29 29  |armimm(.x%,n%())|
000015b0  3a e7 6a 25 3c 69 25 8c  0d 00 68 58 73 25 3d b9  |:.j%<i%...hXs%=.|
000015c0  3a 69 25 3d 6a 25 3a 5b  4f 50 54 70 61 73 73 25  |:i%=j%:[OPTpass%|
000015d0  3a 4d 56 4e 20 72 64 25  2c 23 6e 25 28 30 29 3a  |:MVN rd%,#n%(0):|
000015e0  5d 3a c8 95 6a 25 3e 31  3a 6a 25 2d 3d 31 3a 5b  |]:..j%>1:j%-=1:[|
000015f0  4f 50 54 70 61 73 73 25  3a 42 49 43 20 72 64 25  |OPTpass%:BIC rd%|
00001600  2c 72 64 25 2c 23 6e 25  28 6a 25 29 3a 5d 3a ce  |,rd%,#n%(j%):]:.|
00001610  0d 00 69 05 cd 0d 00 6a  11 cd 3a 6a 25 3d 69 25  |..i....j..:j%=i%|
00001620  3a e7 ac 73 25 8c 0d 00  6b 4c 5b 4f 50 54 70 61  |:..s%...kL[OPTpa|
00001630  73 73 25 3a 4d 4f 56 20  72 64 25 2c 23 6d 25 28  |ss%:MOV rd%,#m%(|
00001640  30 29 3a 5d 3a c8 95 69  25 3e 31 3a 69 25 2d 3d  |0):]:..i%>1:i%-=|
00001650  31 3a 5b 4f 50 54 70 61  73 73 25 3a 84 52 20 72  |1:[OPTpass%:.R r|
00001660  64 25 2c 72 64 25 2c 23  6d 25 28 69 25 29 3a 5d  |d%,rd%,#m%(i%):]|
00001670  3a ce 0d 00 6c 10 cd 3a  e7 a9 28 63 63 24 29 83  |:...l..:..(cc$).|
00001680  32 8c 0d 00 6d 2a 21 a4  61 61 64 72 28 50 25 2d  |2...m*!.aadr(P%-|
00001690  34 29 2b 3d 31 3c 3c 32  30 3a 63 63 24 3d c0 63  |4)+=1<<20:cc$=.c|
000016a0  63 24 2c a9 28 63 63 24  29 2d 31 29 0d 00 6e 1a  |c$,.(cc$)-1)..n.|
000016b0  cd 3a e7 63 63 24 3c 3e  22 22 8c f2 63 63 28 63  |.:.cc$<>""..cc(c|
000016c0  63 24 2c 6a 25 29 0d 00  6f 06 3d 30 0d 00 70 30  |c$,j%)..o.=0..p0|
000016d0  dd a4 67 62 28 63 63 24  2c 72 25 2c 6f 25 29 3a  |..gb(cc$,r%,o%):|
000016e0  e7 6f 25 3c 30 84 6f 25  3e 73 69 7a 65 6f 66 5f  |.o%<0.o%>sizeof_|
000016f0  47 8c 85 31 2c 22 45 49  41 31 35 22 0d 00 71 18  |G..1,"EIA15"..q.|
00001700  3d a4 41 64 64 49 28 63  63 24 2c 72 25 2c 67 62  |=.AddI(cc$,r%,gb|
00001710  2c 6f 25 29 0d 00 72 fd  dd a4 70 5f 75 78 62 28  |,o%)..r...p_uxb(|
00001720  74 65 6d 70 6c 61 74 65  24 29 3a ea 6c 5f 52 30  |template$):.l_R0|
00001730  2c 6c 5f 6c 72 3a 5b 4f  50 54 70 61 73 73 25 3a  |,l_lr:[OPTpass%:|
00001740  42 20 28 50 25 2b 34 29  2b 33 32 2b 28 28 a9 28  |B (P%+4)+32+((.(|
00001750  74 65 6d 70 6c 61 74 65  24 29 2b 34 29 80 2d 34  |template$)+4).-4|
00001760  29 3a 2e 6c 5f 52 30 20  44 43 44 26 63 62 64 65  |):.l_R0 DCD&cbde|
00001770  61 64 63 62 3a 44 43 44  26 63 62 64 65 61 64 63  |adcb:DCD&cbdeadc|
00001780  3a 44 43 44 26 63 62 64  65 61 64 3a 44 43 44 26  |:DCD&cbdead:DCD&|
00001790  63 62 64 65 61 3a 44 43  44 35 32 31 39 30 3a 44  |cbdea:DCD52190:D|
000017a0  43 44 33 32 36 31 3a 2e  6c 5f 6c 72 20 44 43 44  |CD3261:.l_lr DCD|
000017b0  32 30 33 3a 44 43 44 31  32 3a 45 51 55 53 20 74  |203:DCD12:EQUS t|
000017c0  65 6d 70 6c 61 74 65 24  3a 44 43 42 30 3a 41 4c  |emplate$:DCB0:AL|
000017d0  49 47 4e 3a 53 54 52 30  2c 6c 5f 52 30 3a 41 44  |IGN:STR0,l_R0:AD|
000017e0  52 30 2c 6c 5f 52 30 3a  53 54 4d 49 42 30 2c 7b  |R0,l_R0:STMIB0,{|
000017f0  39 2d 31 35 7d 3a 53 57  49 20 26 64 63 62 38 37  |9-15}:SWI &dcb87|
00001800  3a 4c 44 52 20 6c 72 2c  6c 5f 6c 72 3a 5d 3a 3d  |:LDR lr,l_lr:]:=|
00001810  30 0d 00 73 1d dd a4 61  64 64 33 28 72 64 25 2c  |0..s...add3(rd%,|
00001820  72 6e 25 2c 78 25 29 3a  e7 78 25 3c 30 8c 0d 00  |rn%,x%):.x%<0...|
00001830  74 53 5b 4f 50 54 70 61  73 73 25 3a 53 55 42 20  |tS[OPTpass%:SUB |
00001840  72 64 25 2c 72 6e 25 2c  23 2d 78 25 80 2d 36 35  |rd%,rn%,#-x%.-65|
00001850  35 33 36 3a 53 55 42 20  72 64 25 2c 72 64 25 2c  |536:SUB rd%,rd%,|
00001860  23 2d 78 25 80 32 35 35  3a 53 55 42 20 72 64 25  |#-x%.255:SUB rd%|
00001870  2c 72 64 25 2c 23 2d 78  25 80 36 35 32 38 30 3a  |,rd%,#-x%.65280:|
00001880  5d 0d 00 75 52 cc 3a 5b  4f 50 54 70 61 73 73 25  |]..uR.:[OPTpass%|
00001890  3a 41 44 44 20 72 64 25  2c 72 6e 25 2c 23 78 25  |:ADD rd%,rn%,#x%|
000018a0  80 2d 36 35 35 33 36 3a  41 44 44 20 72 64 25 2c  |.-65536:ADD rd%,|
000018b0  72 64 25 2c 23 78 25 80  32 35 35 3a 41 44 44 20  |rd%,#x%.255:ADD |
000018c0  72 64 25 2c 72 64 25 2c  23 78 25 80 36 35 32 38  |rd%,rd%,#x%.6528|
000018d0  30 3a 5d 0d 00 76 08 cd  3a 3d 30 0d 00 77 5b dd  |0:]..v..:=0..w[.|
000018e0  a4 6d 6f 76 33 28 72 64  25 2c 78 25 29 3a 5b 4f  |.mov3(rd%,x%):[O|
000018f0  50 54 70 61 73 73 25 3a  4d 4f 56 20 72 64 25 2c  |PTpass%:MOV rd%,|
00001900  23 78 25 80 2d 36 35 35  33 36 3a 84 52 20 72 64  |#x%.-65536:.R rd|
00001910  25 2c 72 64 25 2c 23 78  25 80 32 35 35 3a 82 20  |%,rd%,#x%.255:. |
00001920  72 64 25 2c 72 64 25 2c  23 78 25 80 36 35 32 38  |rd%,rd%,#x%.6528|
00001930  30 3a 5d 3a 3d 30 0d 00  78 20 dd f2 41 50 3a ea  |0:]:=0..x ..AP:.|
00001940  6f 25 3a e7 70 61 73 73  25 80 32 8c 6f 25 3d 35  |o%:.pass%.2.o%=5|
00001950  30 8b 6f 25 3d 30 0d 00  79 33 c8 99 26 36 30 36  |0.o%=0..y3..&606|
00001960  63 34 2c 28 28 a4 61 61  64 72 28 50 25 29 2d 63  |c4,((.aadr(P%)-c|
00001970  6f 64 65 25 29 2f 28 4c  25 2d 63 6f 64 65 25 29  |ode%)/(L%-code%)|
00001980  2a 35 30 29 2b 6f 25 3a  e1 0d 00 7a 6e dd a4 6c  |*50)+o%:...zn..l|
00001990  64 68 77 71 28 52 64 2c  52 61 2c 52 69 29 3a 5b  |dhwq(Rd,Ra,Ri):[|
000019a0  4f 50 54 70 61 73 73 25  3a 4d 4f 56 53 20 52 64  |OPTpass%:MOVS Rd|
000019b0  2c 52 69 2c 4c 53 52 23  31 3a 4c 44 52 20 52 64  |,Ri,LSR#1:LDR Rd|
000019c0  2c 5b 52 61 2c 52 64 2c  4c 53 4c 23 32 5d 3a 4d  |,[Ra,Rd,LSL#2]:M|
000019d0  4f 56 63 63 20 52 64 2c  52 64 2c 4c 53 4c 23 31  |OVcc Rd,Rd,LSL#1|
000019e0  36 3a 4d 4f 56 20 52 64  2c 52 64 2c 41 53 52 23  |6:MOV Rd,Rd,ASR#|
000019f0  31 36 3a 5d 3a 3d 30 0d  00 7b 23 dd a4 6c 64 68  |16:]:=0..{#..ldh|
00001a00  77 28 63 63 24 2c 52 64  2c 52 61 2c 52 69 2c 52  |w(cc$,Rd,Ra,Ri,R|
00001a10  74 29 3a e7 52 74 3d 52  61 8c 0d 00 7c 65 5b 4f  |t):.Rt=Ra...|e[O|
00001a20  50 54 70 61 73 73 25 3a  4c 44 52 42 20 52 64 2c  |PTpass%:LDRB Rd,|
00001a30  5b 52 61 2c 52 69 2c 4c  53 4c 23 31 5d 21 3a 4c  |[Ra,Ri,LSL#1]!:L|
00001a40  44 52 42 20 52 74 2c 5b  52 61 2c 23 31 5d 3a 4d  |DRB Rt,[Ra,#1]:M|
00001a50  4f 56 20 52 74 2c 52 74  2c 4c 53 4c 23 32 34 3a  |OV Rt,Rt,LSL#24:|
00001a60  84 52 20 52 64 2c 52 64  2c 52 74 2c 41 53 52 23  |.R Rd,Rd,Rt,ASR#|
00001a70  31 36 3a 5d 3a f2 63 63  28 63 63 24 2c 34 29 0d  |16:]:.cc(cc$,4).|
00001a80  00 7d 73 cc 3a 5b 4f 50  54 70 61 73 73 25 3a 41  |.}s.:[OPTpass%:A|
00001a90  44 44 20 52 74 2c 52 61  2c 52 69 2c 4c 53 4c 23  |DD Rt,Ra,Ri,LSL#|
00001aa0  31 3a 4c 44 52 42 20 52  64 2c 5b 52 74 2c 23 30  |1:LDRB Rd,[Rt,#0|
00001ab0  5d 3a 4c 44 52 42 20 52  74 2c 5b 52 74 2c 23 31  |]:LDRB Rt,[Rt,#1|
00001ac0  5d 3a 4d 4f 56 20 52 74  2c 52 74 2c 4c 53 4c 23  |]:MOV Rt,Rt,LSL#|
00001ad0  32 34 3a 84 52 20 52 64  2c 52 64 2c 52 74 2c 41  |24:.R Rd,Rd,Rt,A|
00001ae0  53 52 23 31 36 3a 5d 3a  f2 63 63 28 63 63 24 2c  |SR#16:]:.cc(cc$,|
00001af0  35 29 0d 00 7e 08 cd 3a  3d 30 0d 00 7f 6f dd a4  |5)..~..:=0...o..|
00001b00  6c 64 75 68 77 71 28 52  64 2c 52 61 2c 52 69 29  |lduhwq(Rd,Ra,Ri)|
00001b10  3a 5b 4f 50 54 70 61 73  73 25 3a 4d 4f 56 53 20  |:[OPTpass%:MOVS |
00001b20  52 64 2c 52 69 2c 4c 53  52 23 31 3a 4c 44 52 20  |Rd,Ri,LSR#1:LDR |
00001b30  52 64 2c 5b 52 61 2c 52  64 2c 4c 53 4c 23 32 5d  |Rd,[Ra,Rd,LSL#2]|
00001b40  3a 4d 4f 56 63 63 20 52  64 2c 52 64 2c 4c 53 4c  |:MOVcc Rd,Rd,LSL|
00001b50  23 31 36 3a 4d 4f 56 20  52 64 2c 52 64 2c 4c 53  |#16:MOV Rd,Rd,LS|
00001b60  52 23 31 36 3a 5d 3a 3d  30 0d 00 80 7b dd a4 6c  |R#16:]:=0...{..l|
00001b70  64 75 68 77 28 63 63 24  2c 52 64 2c 52 61 2c 52  |duhw(cc$,Rd,Ra,R|
00001b80  69 2c 52 74 29 3a 5b 4f  50 54 70 61 73 73 25 3a  |i,Rt):[OPTpass%:|
00001b90  41 44 44 20 52 74 2c 52  61 2c 52 69 2c 4c 53 4c  |ADD Rt,Ra,Ri,LSL|
00001ba0  23 31 3a 4c 44 52 42 20  52 64 2c 5b 52 74 2c 23  |#1:LDRB Rd,[Rt,#|
00001bb0  30 5d 3a 4c 44 52 42 20  52 74 2c 5b 52 74 2c 23  |0]:LDRB Rt,[Rt,#|
00001bc0  31 5d 3a 84 52 20 52 64  2c 52 64 2c 52 74 2c 4c  |1]:.R Rd,Rd,Rt,L|
00001bd0  53 4c 23 38 3a 5d 3a f2  63 63 28 63 63 24 2c 34  |SL#8:]:.cc(cc$,4|
00001be0  29 3a 3d 30 0d 00 81 26  dd a4 73 74 68 77 28 63  |):=0...&..sthw(c|
00001bf0  63 24 2c 52 61 2c 52 69  2c 52 78 2c 52 74 2c 52  |c$,Ra,Ri,Rx,Rt,R|
00001c00  75 29 3a e7 52 74 3d 52  61 8c 0d 00 82 51 5b 4f  |u):.Rt=Ra....Q[O|
00001c10  50 54 70 61 73 73 25 3a  53 54 52 42 20 52 78 2c  |PTpass%:STRB Rx,|
00001c20  5b 52 61 2c 52 69 2c 4c  53 4c 23 31 5d 21 3a 4d  |[Ra,Ri,LSL#1]!:M|
00001c30  4f 56 20 52 75 2c 52 78  2c 4c 53 52 23 38 3a 53  |OV Ru,Rx,LSR#8:S|
00001c40  54 52 42 20 52 75 2c 5b  52 61 2c 23 31 5d 3a 5d  |TRB Ru,[Ra,#1]:]|
00001c50  3a f2 63 63 28 63 63 24  2c 33 29 0d 00 83 5f cc  |:.cc(cc$,3)..._.|
00001c60  3a 5b 4f 50 54 70 61 73  73 25 3a 41 44 44 20 52  |:[OPTpass%:ADD R|
00001c70  74 2c 52 61 2c 52 69 2c  4c 53 4c 23 31 3a 53 54  |t,Ra,Ri,LSL#1:ST|
00001c80  52 42 20 52 78 2c 5b 52  74 2c 23 30 5d 3a 4d 4f  |RB Rx,[Rt,#0]:MO|
00001c90  56 20 52 75 2c 52 78 2c  4c 53 52 23 38 3a 53 54  |V Ru,Rx,LSR#8:ST|
00001ca0  52 42 20 52 75 2c 5b 52  74 2c 23 31 5d 3a 5d 3a  |RB Ru,[Rt,#1]:]:|
00001cb0  f2 63 63 28 63 63 24 2c  34 29 0d 00 84 08 cd 3a  |.cc(cc$,4).....:|
00001cc0  3d 30 0d ff                                       |=0..|
00001cc4