Home » Archimedes archive » Acorn User » AU 1995-07.adf » !Regulars_Regulars » StarInfo/If/Source/IfThereIs

StarInfo/If/Source/IfThereIs

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 » AU 1995-07.adf » !Regulars_Regulars
Filename: StarInfo/If/Source/IfThereIs
Read OK:
File size: 0DBB bytes
Load address: 0000
Exec address: 0000
File contents
    1REM >IfThereIs
    2REM By Dave Lawrence
    3REM (c) November 1993
    4:
    5DIM code 800
    6wp=12:sp=13:lr=14:pc=15
    7arg_name=0
    8arg_command=4
    9arg_yes=8
   10arg_no=12
   11arg_not=16
   12arg_file=20
   13arg_dir=24
   14arg_app=28
   15arg_image=32
   16FOR pass=0 TO 2 STEP 2:P%=code
   17[OPT pass
   18        STMFD   sp !,{r0-r11,lr}
   19
   20        ADR     r0,args
   21        MOV     r2,wp
   22        MOV     r3,#1024
   23        SWI     "XOS_ReadArgs"
   24        BVS     Error
   25        RSB     r3,r3,#1024
   26        ADD     r8,wp,r3
   27
   28        LDR     r0,[wp,#arg_name]
   29        CMP     r0,#0
   30        LDRNE   r0,[wp,#arg_command]
   31        CMPNE   r0,#0
   32        ADREQ   r0,syntax
   33        BEQ     Error
   34
   35        ; r7 = object type or 0 = any
   36
   37        MOV     r7,#0
   38        LDR     r0,[wp,#arg_file]
   39        CMP     r0,#0
   40        MOVNE   r7,#1
   41        LDR     r0,[wp,#arg_dir]
   42        CMP     r0,#0
   43        MOVNE   r7,#2
   44        MOVNE   r9,#&1000
   45        LDR     r0,[wp,#arg_app]
   46        CMP     r0,#0
   47        MOVNE   r7,#2
   48        MOVNE   r9,#&2000
   49        LDR     r0,[wp,#arg_image]
   50        CMP     r0,#0
   51        MOVNE   r7,#3
   52
   53        MOV     r0,#20
   54        LDR     r1,[wp,#arg_name]
   55        SWI     "XOS_File"
   56        BVS     Error
   57        
   58        CMP     r0,#0
   59        BEQ     do_no
   60        CMP     r7,#0
   61        BEQ     do_yes
   62        CMP     r0,r7
   63        BNE     do_no
   64        CMP     r0,#2
   65        BNE     do_yes
   66        CMP     r6,r9
   67        BNE     do_no
   68        
   69.do_yes
   70        LDR     r0,[wp,#arg_not]
   71        CMP     r0,#0
   72        BNE     really_no
   73.really_yes        
   74        ADD     r0,wp,#arg_command
   75        LDMIA   r0,{r5,r6,r7}
   76        TEQ     r7,#0
   77        MOVEQ   r6,#0
   78        B       do_command
   79.do_no
   80        LDR     r0,[wp,#arg_not]
   81        CMP     r0,#0
   82        BNE     really_yes
   83.really_no        
   84        ADD     r0,wp,#arg_command
   85        LDMIA   r0,{r5,r6,r7}
   86        TEQ     r6,#0
   87        TEQNE   r7,#0
   88        MOVNE   r6,r7
   89        BNE     do_command
   90        TEQ     r6,#0
   91        BEQ     Exit
   92        MOV     r5,r6
   93        MOV     r6,#0
   94.do_command
   95        MOV     r1,r8
   96        MOV     r0,r5
   97        MOV     r2,#32
   98        BL      copy
   99        MOVS    r0,r6
  100        MOV     r2,#0
  101        BLNE    copy
  102        STREQB  r2,[r1,#-1]
  103.os_cli
  104        MOV     r0,r8
  105        SWI     "XOS_CLI"
  106        BVS     Error
  107
  108.Exit   LDMFD   sp !,{r0-r11,pc}
  109
  110.Error  ADD     sp,sp,#4
  111        LDMFD   sp !,{r1-r11,lr}
  112        ORRS    pc,lr,#1<<28
  113
  114.copy   LDRB    r3,[r0],#1
  115        STRB    r3,[r1],#1
  116        CMP     r3,#32
  117        BGE     copy
  118        STRB    r2,[r1,#-1]
  119        MOV     pc,lr
  120                
  121.syntax
  122        EQUD    220
  123        EQUS    "Syntax: *IfThereIs [-Not] [ -File | -Dir | -App | -Image ] <object>  <�yes� command> [<�no� command>] | <command> <�yes� param> <�no� param>"
  124        EQUB    0
  125        ALIGN
  126.args
  127        EQUS    ",,,,not/s,file/s,dir/s,app/s,image/s"
  128        EQUB    0
  129        ALIGN        
  130        EQUS    "dL 16/11/93"
  131]NEXT
  132SYS "OS_File",10,"%.IfThereIs",&FFC,,code,P%
  133END
  134:
  135DEF FNlc(reg)
  136[OPT pass
  137 SUB     reg,reg,#ASC"a"
  138 CMP     reg,#ASC"z"-ASC"a"+1
  139 SUBCC   reg,reg,#32
  140 ADD     reg,reg,#ASC"a"
  141 CMP     reg,#32
  142 MOVLT   reg,#0
  143]
  144=""
� >IfThereIs
� By Dave Lawrence
� (c) November 1993
:
� code 800
wp=12:sp=13:lr=14:pc=15
arg_name=0
arg_command=4
	
arg_yes=8


arg_no=12
arg_not=16
arg_file=20

arg_dir=24
arg_app=28
arg_image=32
� pass=0 � 2 � 2:P%=code

[OPT pass
$        STMFD   sp !,{r0-r11,lr}

        ADR     r0,args
        MOV     r2,wp
        MOV     r3,#1024
"        SWI     "XOS_ReadArgs"
        BVS     Error
        RSB     r3,r3,#1024
        ADD     r8,wp,r3

%        LDR     r0,[wp,#arg_name]
        CMP     r0,#0
(        LDRNE   r0,[wp,#arg_command]
        CMPNE   r0,#0
         ADREQ   r0,syntax
!        BEQ     Error
"
#)        ; r7 = object type or 0 = any
$
%        MOV     r7,#0
&%        LDR     r0,[wp,#arg_file]
'        CMP     r0,#0
(        MOVNE   r7,#1
)$        LDR     r0,[wp,#arg_dir]
*        CMP     r0,#0
+        MOVNE   r7,#2
,        MOVNE   r9,#&1000
-$        LDR     r0,[wp,#arg_app]
.        CMP     r0,#0
/        MOVNE   r7,#2
0        MOVNE   r9,#&2000
1&        LDR     r0,[wp,#arg_image]
2        CMP     r0,#0
3        MOVNE   r7,#3
4
5        MOV     r0,#20
6%        LDR     r1,[wp,#arg_name]
7        SWI     "XOS_File"
8        BVS     Error
9        
:        CMP     r0,#0
;        BEQ     do_no
<        CMP     r7,#0
=        BEQ     do_yes
>        CMP     r0,r7
?        BNE     do_no
@        CMP     r0,#2
A        BNE     do_yes
B        CMP     r6,r9
C        BNE     do_no
D        
E.do_yes
F$        LDR     r0,[wp,#arg_not]
G        CMP     r0,#0
H        BNE     really_no
I.really_yes        
J&        ADD     r0,wp,#arg_command
K!        LDMIA   r0,{r5,r6,r7}
L        TEQ     r7,#0
M        �Q   r6,#0
N        B       do_command
O
.do_no
P$        LDR     r0,[wp,#arg_not]
Q        CMP     r0,#0
R        BNE     really_yes
S.really_no        
T&        ADD     r0,wp,#arg_command
U!        LDMIA   r0,{r5,r6,r7}
V        TEQ     r6,#0
W        TEQNE   r7,#0
X        MOVNE   r6,r7
Y        BNE     do_command
Z        TEQ     r6,#0
[        BEQ     Exit
\        MOV     r5,r6
]        MOV     r6,#0
^.do_command
_        MOV     r1,r8
`        MOV     r0,r5
a        MOV     r2,#32
b        BL      copy
c        MOVS    r0,r6
d        MOV     r2,#0
e        BLNE    copy
f        STREQB  r2,[r1,#-1]
g.os_cli
h        MOV     r0,r8
i        SWI     "XOS_CLI"
j        BVS     Error
k
l$.Exit   LDMFD   sp !,{r0-r11,pc}
m
n.Error  ADD     sp,sp,#4
o$        LDMFD   sp !,{r1-r11,lr}
p        �RS    pc,lr,#1<<28
q
r.copy   LDRB    r3,[r0],#1
s        STRB    r3,[r1],#1
t        CMP     r3,#32
u        BGE     copy
v        STRB    r2,[r1,#-1]
w        MOV     pc,lr
x                
y.syntax
z        EQUD    220
{�        EQUS    "Syntax: *IfThereIs [-Not] [ -File | -Dir | -App | -Image ] <object>  <�yes� command> [<�no� command>] | <command> <�yes� param> <�no� param>"
|        EQUB    0
}        ALIGN
~	.args
:        EQUS    ",,,,not/s,file/s,dir/s,app/s,image/s"
�        EQUB    0
�        ALIGN        
�!        EQUS    "dL 16/11/93"
�]�
�/ș "OS_File",10,"%.IfThereIs",&FFC,,code,P%
��
�:
�� �lc(reg)
�
[OPT pass
� SUB     reg,reg,#�"a"
� CMP     reg,#�"z"-�"a"+1
� SUBCC   reg,reg,#32
� ADD     reg,reg,#�"a"
� CMP     reg,#32
� MOVLT   reg,#0
�]
�=""
�
00000000  0d 00 01 10 f4 20 3e 49  66 54 68 65 72 65 49 73  |..... >IfThereIs|
00000010  0d 00 02 16 f4 20 42 79  20 44 61 76 65 20 4c 61  |..... By Dave La|
00000020  77 72 65 6e 63 65 0d 00  03 17 f4 20 28 63 29 20  |wrence..... (c) |
00000030  4e 6f 76 65 6d 62 65 72  20 31 39 39 33 0d 00 04  |November 1993...|
00000040  05 3a 0d 00 05 0e de 20  63 6f 64 65 20 38 30 30  |.:..... code 800|
00000050  0d 00 06 1b 77 70 3d 31  32 3a 73 70 3d 31 33 3a  |....wp=12:sp=13:|
00000060  6c 72 3d 31 34 3a 70 63  3d 31 35 0d 00 07 0e 61  |lr=14:pc=15....a|
00000070  72 67 5f 6e 61 6d 65 3d  30 0d 00 08 11 61 72 67  |rg_name=0....arg|
00000080  5f 63 6f 6d 6d 61 6e 64  3d 34 0d 00 09 0d 61 72  |_command=4....ar|
00000090  67 5f 79 65 73 3d 38 0d  00 0a 0d 61 72 67 5f 6e  |g_yes=8....arg_n|
000000a0  6f 3d 31 32 0d 00 0b 0e  61 72 67 5f 6e 6f 74 3d  |o=12....arg_not=|
000000b0  31 36 0d 00 0c 0f 61 72  67 5f 66 69 6c 65 3d 32  |16....arg_file=2|
000000c0  30 0d 00 0d 0e 61 72 67  5f 64 69 72 3d 32 34 0d  |0....arg_dir=24.|
000000d0  00 0e 0e 61 72 67 5f 61  70 70 3d 32 38 0d 00 0f  |...arg_app=28...|
000000e0  10 61 72 67 5f 69 6d 61  67 65 3d 33 32 0d 00 10  |.arg_image=32...|
000000f0  1c e3 20 70 61 73 73 3d  30 20 b8 20 32 20 88 20  |.. pass=0 . 2 . |
00000100  32 3a 50 25 3d 63 6f 64  65 0d 00 11 0d 5b 4f 50  |2:P%=code....[OP|
00000110  54 20 70 61 73 73 0d 00  12 24 20 20 20 20 20 20  |T pass...$      |
00000120  20 20 53 54 4d 46 44 20  20 20 73 70 20 21 2c 7b  |  STMFD   sp !,{|
00000130  72 30 2d 72 31 31 2c 6c  72 7d 0d 00 13 04 0d 00  |r0-r11,lr}......|
00000140  14 1b 20 20 20 20 20 20  20 20 41 44 52 20 20 20  |..        ADR   |
00000150  20 20 72 30 2c 61 72 67  73 0d 00 15 19 20 20 20  |  r0,args....   |
00000160  20 20 20 20 20 4d 4f 56  20 20 20 20 20 72 32 2c  |     MOV     r2,|
00000170  77 70 0d 00 16 1c 20 20  20 20 20 20 20 20 4d 4f  |wp....        MO|
00000180  56 20 20 20 20 20 72 33  2c 23 31 30 32 34 0d 00  |V     r3,#1024..|
00000190  17 22 20 20 20 20 20 20  20 20 53 57 49 20 20 20  |."        SWI   |
000001a0  20 20 22 58 4f 53 5f 52  65 61 64 41 72 67 73 22  |  "XOS_ReadArgs"|
000001b0  0d 00 18 19 20 20 20 20  20 20 20 20 42 56 53 20  |....        BVS |
000001c0  20 20 20 20 45 72 72 6f  72 0d 00 19 1f 20 20 20  |    Error....   |
000001d0  20 20 20 20 20 52 53 42  20 20 20 20 20 72 33 2c  |     RSB     r3,|
000001e0  72 33 2c 23 31 30 32 34  0d 00 1a 1c 20 20 20 20  |r3,#1024....    |
000001f0  20 20 20 20 41 44 44 20  20 20 20 20 72 38 2c 77  |    ADD     r8,w|
00000200  70 2c 72 33 0d 00 1b 04  0d 00 1c 25 20 20 20 20  |p,r3.......%    |
00000210  20 20 20 20 4c 44 52 20  20 20 20 20 72 30 2c 5b  |    LDR     r0,[|
00000220  77 70 2c 23 61 72 67 5f  6e 61 6d 65 5d 0d 00 1d  |wp,#arg_name]...|
00000230  19 20 20 20 20 20 20 20  20 43 4d 50 20 20 20 20  |.        CMP    |
00000240  20 72 30 2c 23 30 0d 00  1e 28 20 20 20 20 20 20  | r0,#0...(      |
00000250  20 20 4c 44 52 4e 45 20  20 20 72 30 2c 5b 77 70  |  LDRNE   r0,[wp|
00000260  2c 23 61 72 67 5f 63 6f  6d 6d 61 6e 64 5d 0d 00  |,#arg_command]..|
00000270  1f 19 20 20 20 20 20 20  20 20 43 4d 50 4e 45 20  |..        CMPNE |
00000280  20 20 72 30 2c 23 30 0d  00 20 1d 20 20 20 20 20  |  r0,#0.. .     |
00000290  20 20 20 41 44 52 45 51  20 20 20 72 30 2c 73 79  |   ADREQ   r0,sy|
000002a0  6e 74 61 78 0d 00 21 19  20 20 20 20 20 20 20 20  |ntax..!.        |
000002b0  42 45 51 20 20 20 20 20  45 72 72 6f 72 0d 00 22  |BEQ     Error.."|
000002c0  04 0d 00 23 29 20 20 20  20 20 20 20 20 3b 20 72  |...#)        ; r|
000002d0  37 20 3d 20 6f 62 6a 65  63 74 20 74 79 70 65 20  |7 = object type |
000002e0  6f 72 20 30 20 3d 20 61  6e 79 0d 00 24 04 0d 00  |or 0 = any..$...|
000002f0  25 19 20 20 20 20 20 20  20 20 4d 4f 56 20 20 20  |%.        MOV   |
00000300  20 20 72 37 2c 23 30 0d  00 26 25 20 20 20 20 20  |  r7,#0..&%     |
00000310  20 20 20 4c 44 52 20 20  20 20 20 72 30 2c 5b 77  |   LDR     r0,[w|
00000320  70 2c 23 61 72 67 5f 66  69 6c 65 5d 0d 00 27 19  |p,#arg_file]..'.|
00000330  20 20 20 20 20 20 20 20  43 4d 50 20 20 20 20 20  |        CMP     |
00000340  72 30 2c 23 30 0d 00 28  19 20 20 20 20 20 20 20  |r0,#0..(.       |
00000350  20 4d 4f 56 4e 45 20 20  20 72 37 2c 23 31 0d 00  | MOVNE   r7,#1..|
00000360  29 24 20 20 20 20 20 20  20 20 4c 44 52 20 20 20  |)$        LDR   |
00000370  20 20 72 30 2c 5b 77 70  2c 23 61 72 67 5f 64 69  |  r0,[wp,#arg_di|
00000380  72 5d 0d 00 2a 19 20 20  20 20 20 20 20 20 43 4d  |r]..*.        CM|
00000390  50 20 20 20 20 20 72 30  2c 23 30 0d 00 2b 19 20  |P     r0,#0..+. |
000003a0  20 20 20 20 20 20 20 4d  4f 56 4e 45 20 20 20 72  |       MOVNE   r|
000003b0  37 2c 23 32 0d 00 2c 1d  20 20 20 20 20 20 20 20  |7,#2..,.        |
000003c0  4d 4f 56 4e 45 20 20 20  72 39 2c 23 26 31 30 30  |MOVNE   r9,#&100|
000003d0  30 0d 00 2d 24 20 20 20  20 20 20 20 20 4c 44 52  |0..-$        LDR|
000003e0  20 20 20 20 20 72 30 2c  5b 77 70 2c 23 61 72 67  |     r0,[wp,#arg|
000003f0  5f 61 70 70 5d 0d 00 2e  19 20 20 20 20 20 20 20  |_app]....       |
00000400  20 43 4d 50 20 20 20 20  20 72 30 2c 23 30 0d 00  | CMP     r0,#0..|
00000410  2f 19 20 20 20 20 20 20  20 20 4d 4f 56 4e 45 20  |/.        MOVNE |
00000420  20 20 72 37 2c 23 32 0d  00 30 1d 20 20 20 20 20  |  r7,#2..0.     |
00000430  20 20 20 4d 4f 56 4e 45  20 20 20 72 39 2c 23 26  |   MOVNE   r9,#&|
00000440  32 30 30 30 0d 00 31 26  20 20 20 20 20 20 20 20  |2000..1&        |
00000450  4c 44 52 20 20 20 20 20  72 30 2c 5b 77 70 2c 23  |LDR     r0,[wp,#|
00000460  61 72 67 5f 69 6d 61 67  65 5d 0d 00 32 19 20 20  |arg_image]..2.  |
00000470  20 20 20 20 20 20 43 4d  50 20 20 20 20 20 72 30  |      CMP     r0|
00000480  2c 23 30 0d 00 33 19 20  20 20 20 20 20 20 20 4d  |,#0..3.        M|
00000490  4f 56 4e 45 20 20 20 72  37 2c 23 33 0d 00 34 04  |OVNE   r7,#3..4.|
000004a0  0d 00 35 1a 20 20 20 20  20 20 20 20 4d 4f 56 20  |..5.        MOV |
000004b0  20 20 20 20 72 30 2c 23  32 30 0d 00 36 25 20 20  |    r0,#20..6%  |
000004c0  20 20 20 20 20 20 4c 44  52 20 20 20 20 20 72 31  |      LDR     r1|
000004d0  2c 5b 77 70 2c 23 61 72  67 5f 6e 61 6d 65 5d 0d  |,[wp,#arg_name].|
000004e0  00 37 1e 20 20 20 20 20  20 20 20 53 57 49 20 20  |.7.        SWI  |
000004f0  20 20 20 22 58 4f 53 5f  46 69 6c 65 22 0d 00 38  |   "XOS_File"..8|
00000500  19 20 20 20 20 20 20 20  20 42 56 53 20 20 20 20  |.        BVS    |
00000510  20 45 72 72 6f 72 0d 00  39 0c 20 20 20 20 20 20  | Error..9.      |
00000520  20 20 0d 00 3a 19 20 20  20 20 20 20 20 20 43 4d  |  ..:.        CM|
00000530  50 20 20 20 20 20 72 30  2c 23 30 0d 00 3b 19 20  |P     r0,#0..;. |
00000540  20 20 20 20 20 20 20 42  45 51 20 20 20 20 20 64  |       BEQ     d|
00000550  6f 5f 6e 6f 0d 00 3c 19  20 20 20 20 20 20 20 20  |o_no..<.        |
00000560  43 4d 50 20 20 20 20 20  72 37 2c 23 30 0d 00 3d  |CMP     r7,#0..=|
00000570  1a 20 20 20 20 20 20 20  20 42 45 51 20 20 20 20  |.        BEQ    |
00000580  20 64 6f 5f 79 65 73 0d  00 3e 19 20 20 20 20 20  | do_yes..>.     |
00000590  20 20 20 43 4d 50 20 20  20 20 20 72 30 2c 72 37  |   CMP     r0,r7|
000005a0  0d 00 3f 19 20 20 20 20  20 20 20 20 42 4e 45 20  |..?.        BNE |
000005b0  20 20 20 20 64 6f 5f 6e  6f 0d 00 40 19 20 20 20  |    do_no..@.   |
000005c0  20 20 20 20 20 43 4d 50  20 20 20 20 20 72 30 2c  |     CMP     r0,|
000005d0  23 32 0d 00 41 1a 20 20  20 20 20 20 20 20 42 4e  |#2..A.        BN|
000005e0  45 20 20 20 20 20 64 6f  5f 79 65 73 0d 00 42 19  |E     do_yes..B.|
000005f0  20 20 20 20 20 20 20 20  43 4d 50 20 20 20 20 20  |        CMP     |
00000600  72 36 2c 72 39 0d 00 43  19 20 20 20 20 20 20 20  |r6,r9..C.       |
00000610  20 42 4e 45 20 20 20 20  20 64 6f 5f 6e 6f 0d 00  | BNE     do_no..|
00000620  44 0c 20 20 20 20 20 20  20 20 0d 00 45 0b 2e 64  |D.        ..E..d|
00000630  6f 5f 79 65 73 0d 00 46  24 20 20 20 20 20 20 20  |o_yes..F$       |
00000640  20 4c 44 52 20 20 20 20  20 72 30 2c 5b 77 70 2c  | LDR     r0,[wp,|
00000650  23 61 72 67 5f 6e 6f 74  5d 0d 00 47 19 20 20 20  |#arg_not]..G.   |
00000660  20 20 20 20 20 43 4d 50  20 20 20 20 20 72 30 2c  |     CMP     r0,|
00000670  23 30 0d 00 48 1d 20 20  20 20 20 20 20 20 42 4e  |#0..H.        BN|
00000680  45 20 20 20 20 20 72 65  61 6c 6c 79 5f 6e 6f 0d  |E     really_no.|
00000690  00 49 17 2e 72 65 61 6c  6c 79 5f 79 65 73 20 20  |.I..really_yes  |
000006a0  20 20 20 20 20 20 0d 00  4a 26 20 20 20 20 20 20  |      ..J&      |
000006b0  20 20 41 44 44 20 20 20  20 20 72 30 2c 77 70 2c  |  ADD     r0,wp,|
000006c0  23 61 72 67 5f 63 6f 6d  6d 61 6e 64 0d 00 4b 21  |#arg_command..K!|
000006d0  20 20 20 20 20 20 20 20  4c 44 4d 49 41 20 20 20  |        LDMIA   |
000006e0  72 30 2c 7b 72 35 2c 72  36 2c 72 37 7d 0d 00 4c  |r0,{r5,r6,r7}..L|
000006f0  19 20 20 20 20 20 20 20  20 54 45 51 20 20 20 20  |.        TEQ    |
00000700  20 72 37 2c 23 30 0d 00  4d 16 20 20 20 20 20 20  | r7,#0..M.      |
00000710  20 20 ec 51 20 20 20 72  36 2c 23 30 0d 00 4e 1e  |  .Q   r6,#0..N.|
00000720  20 20 20 20 20 20 20 20  42 20 20 20 20 20 20 20  |        B       |
00000730  64 6f 5f 63 6f 6d 6d 61  6e 64 0d 00 4f 0a 2e 64  |do_command..O..d|
00000740  6f 5f 6e 6f 0d 00 50 24  20 20 20 20 20 20 20 20  |o_no..P$        |
00000750  4c 44 52 20 20 20 20 20  72 30 2c 5b 77 70 2c 23  |LDR     r0,[wp,#|
00000760  61 72 67 5f 6e 6f 74 5d  0d 00 51 19 20 20 20 20  |arg_not]..Q.    |
00000770  20 20 20 20 43 4d 50 20  20 20 20 20 72 30 2c 23  |    CMP     r0,#|
00000780  30 0d 00 52 1e 20 20 20  20 20 20 20 20 42 4e 45  |0..R.        BNE|
00000790  20 20 20 20 20 72 65 61  6c 6c 79 5f 79 65 73 0d  |     really_yes.|
000007a0  00 53 16 2e 72 65 61 6c  6c 79 5f 6e 6f 20 20 20  |.S..really_no   |
000007b0  20 20 20 20 20 0d 00 54  26 20 20 20 20 20 20 20  |     ..T&       |
000007c0  20 41 44 44 20 20 20 20  20 72 30 2c 77 70 2c 23  | ADD     r0,wp,#|
000007d0  61 72 67 5f 63 6f 6d 6d  61 6e 64 0d 00 55 21 20  |arg_command..U! |
000007e0  20 20 20 20 20 20 20 4c  44 4d 49 41 20 20 20 72  |       LDMIA   r|
000007f0  30 2c 7b 72 35 2c 72 36  2c 72 37 7d 0d 00 56 19  |0,{r5,r6,r7}..V.|
00000800  20 20 20 20 20 20 20 20  54 45 51 20 20 20 20 20  |        TEQ     |
00000810  72 36 2c 23 30 0d 00 57  19 20 20 20 20 20 20 20  |r6,#0..W.       |
00000820  20 54 45 51 4e 45 20 20  20 72 37 2c 23 30 0d 00  | TEQNE   r7,#0..|
00000830  58 19 20 20 20 20 20 20  20 20 4d 4f 56 4e 45 20  |X.        MOVNE |
00000840  20 20 72 36 2c 72 37 0d  00 59 1e 20 20 20 20 20  |  r6,r7..Y.     |
00000850  20 20 20 42 4e 45 20 20  20 20 20 64 6f 5f 63 6f  |   BNE     do_co|
00000860  6d 6d 61 6e 64 0d 00 5a  19 20 20 20 20 20 20 20  |mmand..Z.       |
00000870  20 54 45 51 20 20 20 20  20 72 36 2c 23 30 0d 00  | TEQ     r6,#0..|
00000880  5b 18 20 20 20 20 20 20  20 20 42 45 51 20 20 20  |[.        BEQ   |
00000890  20 20 45 78 69 74 0d 00  5c 19 20 20 20 20 20 20  |  Exit..\.      |
000008a0  20 20 4d 4f 56 20 20 20  20 20 72 35 2c 72 36 0d  |  MOV     r5,r6.|
000008b0  00 5d 19 20 20 20 20 20  20 20 20 4d 4f 56 20 20  |.].        MOV  |
000008c0  20 20 20 72 36 2c 23 30  0d 00 5e 0f 2e 64 6f 5f  |   r6,#0..^..do_|
000008d0  63 6f 6d 6d 61 6e 64 0d  00 5f 19 20 20 20 20 20  |command.._.     |
000008e0  20 20 20 4d 4f 56 20 20  20 20 20 72 31 2c 72 38  |   MOV     r1,r8|
000008f0  0d 00 60 19 20 20 20 20  20 20 20 20 4d 4f 56 20  |..`.        MOV |
00000900  20 20 20 20 72 30 2c 72  35 0d 00 61 1a 20 20 20  |    r0,r5..a.   |
00000910  20 20 20 20 20 4d 4f 56  20 20 20 20 20 72 32 2c  |     MOV     r2,|
00000920  23 33 32 0d 00 62 18 20  20 20 20 20 20 20 20 42  |#32..b.        B|
00000930  4c 20 20 20 20 20 20 63  6f 70 79 0d 00 63 19 20  |L      copy..c. |
00000940  20 20 20 20 20 20 20 4d  4f 56 53 20 20 20 20 72  |       MOVS    r|
00000950  30 2c 72 36 0d 00 64 19  20 20 20 20 20 20 20 20  |0,r6..d.        |
00000960  4d 4f 56 20 20 20 20 20  72 32 2c 23 30 0d 00 65  |MOV     r2,#0..e|
00000970  18 20 20 20 20 20 20 20  20 42 4c 4e 45 20 20 20  |.        BLNE   |
00000980  20 63 6f 70 79 0d 00 66  1f 20 20 20 20 20 20 20  | copy..f.       |
00000990  20 53 54 52 45 51 42 20  20 72 32 2c 5b 72 31 2c  | STREQB  r2,[r1,|
000009a0  23 2d 31 5d 0d 00 67 0b  2e 6f 73 5f 63 6c 69 0d  |#-1]..g..os_cli.|
000009b0  00 68 19 20 20 20 20 20  20 20 20 4d 4f 56 20 20  |.h.        MOV  |
000009c0  20 20 20 72 30 2c 72 38  0d 00 69 1d 20 20 20 20  |   r0,r8..i.    |
000009d0  20 20 20 20 53 57 49 20  20 20 20 20 22 58 4f 53  |    SWI     "XOS|
000009e0  5f 43 4c 49 22 0d 00 6a  19 20 20 20 20 20 20 20  |_CLI"..j.       |
000009f0  20 42 56 53 20 20 20 20  20 45 72 72 6f 72 0d 00  | BVS     Error..|
00000a00  6b 04 0d 00 6c 24 2e 45  78 69 74 20 20 20 4c 44  |k...l$.Exit   LD|
00000a10  4d 46 44 20 20 20 73 70  20 21 2c 7b 72 30 2d 72  |MFD   sp !,{r0-r|
00000a20  31 31 2c 70 63 7d 0d 00  6d 04 0d 00 6e 1c 2e 45  |11,pc}..m...n..E|
00000a30  72 72 6f 72 20 20 41 44  44 20 20 20 20 20 73 70  |rror  ADD     sp|
00000a40  2c 73 70 2c 23 34 0d 00  6f 24 20 20 20 20 20 20  |,sp,#4..o$      |
00000a50  20 20 4c 44 4d 46 44 20  20 20 73 70 20 21 2c 7b  |  LDMFD   sp !,{|
00000a60  72 31 2d 72 31 31 2c 6c  72 7d 0d 00 70 1f 20 20  |r1-r11,lr}..p.  |
00000a70  20 20 20 20 20 20 84 52  53 20 20 20 20 70 63 2c  |      .RS    pc,|
00000a80  6c 72 2c 23 31 3c 3c 32  38 0d 00 71 04 0d 00 72  |lr,#1<<28..q...r|
00000a90  1e 2e 63 6f 70 79 20 20  20 4c 44 52 42 20 20 20  |..copy   LDRB   |
00000aa0  20 72 33 2c 5b 72 30 5d  2c 23 31 0d 00 73 1e 20  | r3,[r0],#1..s. |
00000ab0  20 20 20 20 20 20 20 53  54 52 42 20 20 20 20 72  |       STRB    r|
00000ac0  33 2c 5b 72 31 5d 2c 23  31 0d 00 74 1a 20 20 20  |3,[r1],#1..t.   |
00000ad0  20 20 20 20 20 43 4d 50  20 20 20 20 20 72 33 2c  |     CMP     r3,|
00000ae0  23 33 32 0d 00 75 18 20  20 20 20 20 20 20 20 42  |#32..u.        B|
00000af0  47 45 20 20 20 20 20 63  6f 70 79 0d 00 76 1f 20  |GE     copy..v. |
00000b00  20 20 20 20 20 20 20 53  54 52 42 20 20 20 20 72  |       STRB    r|
00000b10  32 2c 5b 72 31 2c 23 2d  31 5d 0d 00 77 19 20 20  |2,[r1,#-1]..w.  |
00000b20  20 20 20 20 20 20 4d 4f  56 20 20 20 20 20 70 63  |      MOV     pc|
00000b30  2c 6c 72 0d 00 78 14 20  20 20 20 20 20 20 20 20  |,lr..x.         |
00000b40  20 20 20 20 20 20 20 0d  00 79 0b 2e 73 79 6e 74  |       ..y..synt|
00000b50  61 78 0d 00 7a 17 20 20  20 20 20 20 20 20 45 51  |ax..z.        EQ|
00000b60  55 44 20 20 20 20 32 32  30 0d 00 7b a2 20 20 20  |UD    220..{.   |
00000b70  20 20 20 20 20 45 51 55  53 20 20 20 20 22 53 79  |     EQUS    "Sy|
00000b80  6e 74 61 78 3a 20 2a 49  66 54 68 65 72 65 49 73  |ntax: *IfThereIs|
00000b90  20 5b 2d 4e 6f 74 5d 20  5b 20 2d 46 69 6c 65 20  | [-Not] [ -File |
00000ba0  7c 20 2d 44 69 72 20 7c  20 2d 41 70 70 20 7c 20  || -Dir | -App | |
00000bb0  2d 49 6d 61 67 65 20 5d  20 3c 6f 62 6a 65 63 74  |-Image ] <object|
00000bc0  3e 20 20 3c 90 79 65 73  91 20 63 6f 6d 6d 61 6e  |>  <.yes. comman|
00000bd0  64 3e 20 5b 3c 90 6e 6f  91 20 63 6f 6d 6d 61 6e  |d> [<.no. comman|
00000be0  64 3e 5d 20 7c 20 3c 63  6f 6d 6d 61 6e 64 3e 20  |d>] | <command> |
00000bf0  3c 90 79 65 73 91 20 70  61 72 61 6d 3e 20 3c 90  |<.yes. param> <.|
00000c00  6e 6f 91 20 70 61 72 61  6d 3e 22 0d 00 7c 15 20  |no. param>"..|. |
00000c10  20 20 20 20 20 20 20 45  51 55 42 20 20 20 20 30  |       EQUB    0|
00000c20  0d 00 7d 11 20 20 20 20  20 20 20 20 41 4c 49 47  |..}.        ALIG|
00000c30  4e 0d 00 7e 09 2e 61 72  67 73 0d 00 7f 3a 20 20  |N..~..args...:  |
00000c40  20 20 20 20 20 20 45 51  55 53 20 20 20 20 22 2c  |      EQUS    ",|
00000c50  2c 2c 2c 6e 6f 74 2f 73  2c 66 69 6c 65 2f 73 2c  |,,,not/s,file/s,|
00000c60  64 69 72 2f 73 2c 61 70  70 2f 73 2c 69 6d 61 67  |dir/s,app/s,imag|
00000c70  65 2f 73 22 0d 00 80 15  20 20 20 20 20 20 20 20  |e/s"....        |
00000c80  45 51 55 42 20 20 20 20  30 0d 00 81 19 20 20 20  |EQUB    0....   |
00000c90  20 20 20 20 20 41 4c 49  47 4e 20 20 20 20 20 20  |     ALIGN      |
00000ca0  20 20 0d 00 82 21 20 20  20 20 20 20 20 20 45 51  |  ...!        EQ|
00000cb0  55 53 20 20 20 20 22 64  4c 20 31 36 2f 31 31 2f  |US    "dL 16/11/|
00000cc0  39 33 22 0d 00 83 06 5d  ed 0d 00 84 2f c8 99 20  |93"....]..../.. |
00000cd0  22 4f 53 5f 46 69 6c 65  22 2c 31 30 2c 22 25 2e  |"OS_File",10,"%.|
00000ce0  49 66 54 68 65 72 65 49  73 22 2c 26 46 46 43 2c  |IfThereIs",&FFC,|
00000cf0  2c 63 6f 64 65 2c 50 25  0d 00 85 05 e0 0d 00 86  |,code,P%........|
00000d00  05 3a 0d 00 87 0e dd 20  a4 6c 63 28 72 65 67 29  |.:..... .lc(reg)|
00000d10  0d 00 88 0d 5b 4f 50 54  20 70 61 73 73 0d 00 89  |....[OPT pass...|
00000d20  1a 20 53 55 42 20 20 20  20 20 72 65 67 2c 72 65  |. SUB     reg,re|
00000d30  67 2c 23 97 22 61 22 0d  00 8a 1d 20 43 4d 50 20  |g,#."a".... CMP |
00000d40  20 20 20 20 72 65 67 2c  23 97 22 7a 22 2d 97 22  |    reg,#."z"-."|
00000d50  61 22 2b 31 0d 00 8b 18  20 53 55 42 43 43 20 20  |a"+1.... SUBCC  |
00000d60  20 72 65 67 2c 72 65 67  2c 23 33 32 0d 00 8c 1a  | reg,reg,#32....|
00000d70  20 41 44 44 20 20 20 20  20 72 65 67 2c 72 65 67  | ADD     reg,reg|
00000d80  2c 23 97 22 61 22 0d 00  8d 14 20 43 4d 50 20 20  |,#."a".... CMP  |
00000d90  20 20 20 72 65 67 2c 23  33 32 0d 00 8e 13 20 4d  |   reg,#32.... M|
00000da0  4f 56 4c 54 20 20 20 72  65 67 2c 23 30 0d 00 8f  |OVLT   reg,#0...|
00000db0  05 5d 0d 00 90 07 3d 22  22 0d ff                 |.]....=""..|
00000dbb