Mercurial > hg > Members > kono > nitros9-code
annotate level1/cmds/shell_21.asm @ 1325:84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
author | boisy |
---|---|
date | Thu, 04 Sep 2003 23:06:16 +0000 |
parents | c155aac72190 |
children | 9f3ff1c25f05 |
rev | line source |
---|---|
0 | 1 ******************************************************************** |
2 * Shell - OS-9 Command Interpreter | |
3 * | |
4 * $Id$ | |
5 * | |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
6 * Edt/Rev YYYY/MM/DD Modified by |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
7 * Comment |
0 | 8 * ------------------------------------------------------------------ |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
9 * 20 ????/??/?? |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
10 * From Tandy OS-9 Level One VR 02.00.00. |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
11 * |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
12 * 21 2002/04/05 Boisy G. Pitre |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
13 * CHD no longer requires WRITE permission. |
0 | 14 |
15 nam Shell | |
16 ttl OS-9 Command Interpreter | |
17 | |
18 * Disassembled 02/04/03 22:01:32 by Disasm v1.6 (C) 1988 by RML | |
19 | |
20 ifp1 | |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
21 use defsfile |
0 | 22 endc |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
23 |
0 | 24 tylg set Prgrm+Objct |
25 atrv set ReEnt+rev | |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
924
diff
changeset
|
26 rev set $00 |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
77
diff
changeset
|
27 edition set 21 |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
28 |
0 | 29 mod eom,name,tylg,atrv,start,size |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
30 |
924 | 31 org 0 |
0 | 32 u0000 rmb 1 |
33 u0001 rmb 2 | |
34 u0003 rmb 1 | |
35 u0004 rmb 1 | |
36 u0005 rmb 1 | |
37 u0006 rmb 2 | |
38 u0008 rmb 2 | |
39 u000A rmb 1 | |
40 u000B rmb 1 | |
41 u000C rmb 1 | |
42 u000D rmb 1 | |
43 u000E rmb 1 | |
44 u000F rmb 1 | |
45 u0010 rmb 1 | |
46 u0011 rmb 1 | |
47 u0012 rmb 1 | |
48 u0013 rmb 4 | |
49 u0017 rmb 14 | |
50 u0025 rmb 1 | |
51 u0026 rmb 7 | |
52 u002D rmb 17 | |
53 u003E rmb 5 | |
54 u0043 rmb 8 | |
55 u004B rmb 19 | |
56 u005E rmb 46 | |
57 u008C rmb 1 | |
58 u008D rmb 25 | |
59 u00A6 rmb 4 | |
60 u00AA rmb 17 | |
61 u00BB rmb 25 | |
62 u00D4 rmb 3 | |
63 u00D7 rmb 40 | |
64 u00FF rmb 438 | |
65 size equ . | |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
66 |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
67 name fcs /Shell/ |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
77
diff
changeset
|
68 fcb edition |
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
77
diff
changeset
|
69 |
0 | 70 L0013 fcb $13 |
665 | 71 fcs "PascalS" |
0 | 72 fcb $25 % |
665 | 73 fcs "RunC" |
0 | 74 fcb $22 " |
665 | 75 fcs "RunB" |
0 | 76 fcb $00 |
77 fcb $00 | |
78 fcb $00 | |
79 fcb $00 | |
80 fcb $00 | |
81 fcb $00 | |
82 fcb $00 | |
83 fcb $00 | |
84 fcb $00 | |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
85 L002E fcb C$LF |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
86 fcc "Shell" |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
87 fcb C$CR |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
88 L0035 fcb C$LF |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
89 L0036 fcc "OS9:" |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
90 |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
91 L003A stb <u000E |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
92 rti |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
93 |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
94 start leas -$05,s |
0 | 95 pshs y,x,b,a |
96 ldb #$24 | |
97 lbsr L00C9 | |
98 leax <L003A,pcr | |
99 os9 F$Icpt | |
100 puls x,b,a | |
101 std <u0006 | |
102 beq L005B | |
103 lbsr L0131 | |
104 bcs L00BC | |
105 tst <u000C | |
106 bne L00BB | |
107 L005B lds ,s++ | |
108 leax <L002E,pcr | |
109 tst <u000F | |
110 bne L0074 | |
111 bsr L00BF | |
112 L0067 leax <L0035,pcr | |
113 ldy #$0005 | |
114 L006E tst <u000F | |
115 bne L0074 | |
116 bsr L00C3 | |
117 L0074 clra | |
118 leax <u0025,u | |
119 ldy #$00C8 | |
120 os9 I$ReadLn | |
121 bcc L008E | |
10 | 122 cmpb #E$EOF |
0 | 123 beq L00B2 |
124 L0085 tst <u0011 | |
125 bne L00BC | |
126 os9 F$PErr | |
127 bra L0067 | |
128 L008E cmpy #$0001 | |
129 bhi L009E | |
130 leax >L0036,pcr | |
131 ldy #$0004 | |
132 bra L006E | |
133 L009E tst <u0010 | |
134 beq L00A4 | |
135 bsr L00BF | |
136 L00A4 lbsr L0131 | |
137 bcc L0067 | |
138 tstb | |
139 bne L0085 | |
140 bra L0067 | |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
141 L00AE fcc "eof" |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
142 fcb C$CR |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
143 L00B2 tst <u000F |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
144 bne L00BB |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
145 leax <L00AE,pcr |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
146 bsr L00BF |
0 | 147 L00BB clrb |
148 L00BC os9 F$Exit | |
10 | 149 L00BF ldy #80 |
0 | 150 L00C3 lda #$02 |
151 os9 I$WritLn | |
152 rts | |
153 L00C9 clr b,u | |
154 L00CB decb | |
155 bpl L00C9 | |
156 rts | |
12 | 157 L00CF fdb Comment-* |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
158 fcs "*" |
12 | 159 fdb Wait-* |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
160 fcs "W" |
12 | 161 fdb Chd-* |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
162 fcs "CHD" |
12 | 163 fdb Chx-* |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
164 fcs "CHX" |
12 | 165 fdb Ex-* |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
166 fcs "EX" |
12 | 167 fdb Kill-* |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
168 fcs "KILL" |
12 | 169 fdb X-* |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
170 fcs "X" |
12 | 171 fdb NOX-* |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
172 fcs "-X" |
12 | 173 fdb Prompt-* |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
174 fcs "P" |
12 | 175 fdb NoPrompt-* |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
176 fcs "-P" |
12 | 177 fdb Echo-* |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
178 fcs "T" |
12 | 179 fdb NoEcho-* |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
180 fcs "-T" |
12 | 181 fdb SetPr-* |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
182 fcs "SETPR" |
12 | 183 fdb NextCmd-* |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
184 fcs ";" |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
185 fdb $0000 |
12 | 186 L010A fdb Pipe-* |
187 fcs "!" | |
188 fdb NextCmd2-* | |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
189 fcs ";" |
12 | 190 fdb Backgrnd-* |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
191 fcs "&" |
12 | 192 fdb Return-* |
193 fcb $80+C$CR | |
194 L0116 fdb ErrRedir-* | |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
195 fcs ">>" |
12 | 196 fdb InRedir-* |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
197 fcs "<" |
12 | 198 fdb OutRedir-* |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
199 fcs ">" |
12 | 200 fdb StkSiz-* |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
201 fcs "#" |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
202 fdb $0000 |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
203 L0125 fcb $0d |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
204 fcc "()" |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
205 fcb $FF |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
206 L0129 fcb $0D |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
207 fcb $21,$23,$26,$3b,$3c,$3e,$ff |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
208 L0131 fcb $c6,$0E,$8d,$94 |
0 | 209 L0135 clr <u0003 |
210 clr <u000E | |
211 leay <L00CF,pcr | |
212 lbsr L01C3 | |
213 bcs L0192 | |
10 | 214 cmpa #C$CR |
0 | 215 beq L0192 |
216 sta <u000C | |
10 | 217 cmpa #'( |
0 | 218 bne L016F |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
219 leay >name,pcr |
0 | 220 sty <u0004 |
221 leax $01,x | |
222 stx <u0008 | |
223 L0156 inc <u000D | |
224 L0158 leay <L0125,pcr | |
225 bsr L01DB | |
10 | 226 cmpa #'( |
0 | 227 beq L0156 |
10 | 228 cmpa #') |
0 | 229 bne L018A |
230 dec <u000D | |
231 bne L0158 | |
232 lda #$0D | |
233 sta -$01,x | |
234 bra L0173 | |
235 L016F bsr L0195 | |
236 bcs L0192 | |
237 L0173 leay <L0129,pcr | |
238 bsr L01DB | |
239 tfr x,d | |
240 subd <u0008 | |
241 std <u0006 | |
242 leax -$01,x | |
243 leay <L010A,pcr | |
244 bsr L01C3 | |
245 bcs L0192 | |
246 ldy <u0004 | |
247 L018A lbne L02BE | |
10 | 248 cmpa #C$CR |
0 | 249 bne L0135 |
250 L0192 lbra L028F | |
251 L0195 stx <u0004 | |
252 bsr L01A8 | |
253 bcs L01A7 | |
254 L019B bsr L01A8 | |
255 bcc L019B | |
256 leay >L0116,pcr | |
257 bsr L01C3 | |
258 stx <u0008 | |
259 L01A7 rts | |
260 L01A8 os9 F$PrsNam | |
261 bcc L01B9 | |
262 lda ,x+ | |
10 | 263 cmpa #C$PERD |
0 | 264 bne L01BD |
265 cmpa ,x+ | |
266 beq L01BB | |
267 leay -$01,x | |
268 L01B9 leax ,y | |
269 L01BB clra | |
270 rts | |
271 L01BD comb | |
272 leax -$01,x | |
10 | 273 ldb #E$BPNAM |
0 | 274 rts |
275 L01C3 bsr L01E9 | |
276 pshs y | |
277 bsr L020C | |
278 bcs L01D4 | |
279 ldd ,y | |
280 jsr d,y | |
281 puls y | |
282 bcc L01C3 | |
283 rts | |
284 L01D4 clra | |
285 lda ,x | |
286 puls pc,y | |
287 L01D9 puls y | |
288 L01DB pshs y | |
289 lda ,x+ | |
290 L01DF tst ,y | |
291 bmi L01D9 | |
292 cmpa ,y+ | |
293 bne L01DF | |
294 puls pc,y | |
295 L01E9 pshs x | |
296 lda ,x+ | |
10 | 297 cmpa #C$SPAC |
0 | 298 beq L01FF |
10 | 299 cmpa #C$COMA |
0 | 300 beq L01FF |
301 leax >L0129,pcr | |
302 L01F9 cmpa ,x+ | |
303 bhi L01F9 | |
304 puls pc,x | |
305 L01FF leas $02,s | |
10 | 306 lda #C$SPAC |
0 | 307 L0203 cmpa ,x+ |
308 beq L0203 | |
309 leax -$01,x | |
12 | 310 NextCmd andcc #^Carry |
0 | 311 rts |
312 L020C pshs y,x | |
313 leay $02,y | |
314 L0210 ldx ,s | |
315 L0212 lda ,x+ | |
316 cmpa #$61 | |
317 bcs L021A | |
318 suba #$20 | |
319 L021A eora ,y+ | |
320 lsla | |
321 bne L022E | |
322 bcc L0212 | |
323 lda -$01,y | |
324 cmpa #$C1 | |
325 bcs L022B | |
326 bsr L01E9 | |
327 bcs L022E | |
328 L022B clra | |
329 puls pc,y,b,a | |
330 L022E leay -$01,y | |
331 L0230 lda ,y+ | |
332 bpl L0230 | |
333 sty $02,s | |
334 ldd ,y++ | |
335 bne L0210 | |
336 comb | |
337 puls pc,y,x | |
12 | 338 |
339 Ex lbsr L0195 | |
0 | 340 clra |
341 bsr L0260 | |
342 bsr L025F | |
343 bsr L025F | |
12 | 344 bsr Comment |
0 | 345 leax $01,x |
346 tfr x,d | |
347 subd <u0008 | |
348 std <u0006 | |
349 leas >u00FF,u | |
350 lbsr L0394 | |
351 os9 F$Chain | |
352 os9 F$Exit | |
353 L025F inca | |
354 L0260 pshs a | |
355 bra L02AB | |
12 | 356 |
357 Chx lda #DIR.+EXEC. | |
0 | 358 bra L026A |
77 | 359 *Chd lda #DIR.+UPDAT. |
360 * Removed WRITE. requirement above (some devices are read only) | |
361 Chd lda #DIR.+READ. | |
0 | 362 L026A os9 I$ChgDir |
363 rts | |
12 | 364 Prompt clra |
0 | 365 bra L0273 |
12 | 366 NoPrompt lda #$01 |
0 | 367 L0273 sta <u000F |
368 rts | |
12 | 369 Echo lda #$01 |
0 | 370 bra L027B |
12 | 371 NoEcho clra |
0 | 372 L027B sta <u0010 |
373 rts | |
12 | 374 X lda #$01 |
0 | 375 bra L0283 |
12 | 376 |
377 NOX clra | |
0 | 378 L0283 sta <u0011 |
379 rts | |
12 | 380 Comment lda #C$CR |
0 | 381 L0288 cmpa ,x+ |
382 bne L0288 | |
383 cmpa ,-x | |
384 rts | |
385 L028F pshs b,a,cc | |
386 clra | |
387 L0292 bsr L029D | |
388 inca | |
389 cmpa #$02 | |
390 bls L0292 | |
391 ror ,s+ | |
392 puls pc,b,a | |
393 L029D pshs a | |
394 tst a,u | |
395 beq L02B6 | |
396 os9 I$Close | |
397 lda a,u | |
398 os9 I$Dup | |
399 L02AB ldb ,s | |
400 lda b,u | |
401 beq L02B6 | |
402 clr b,u | |
403 os9 I$Close | |
404 L02B6 puls pc,a | |
10 | 405 L02B8 fcc "WHAT?" |
406 fcb C$CR | |
0 | 407 L02BE bsr L028F |
408 leax <L02B8,pcr | |
409 lbsr L00BF | |
410 clrb | |
411 coma | |
412 rts | |
12 | 413 InRedir ldd #$0001 |
0 | 414 bra L02E3 |
12 | 415 ErrRedir ldd #$020D |
0 | 416 stb -$02,x |
417 bra L02D7 | |
12 | 418 |
419 OutRedir lda #$01 | |
0 | 420 L02D7 ldb #$02 |
421 bra L02E3 | |
10 | 422 L02DB tst a,u |
0 | 423 bne L02BE |
424 pshs b,a | |
425 bra L02ED | |
426 L02E3 tst a,u | |
427 bne L02BE | |
428 pshs b,a | |
429 ldb #$0D | |
430 stb -$01,x | |
431 L02ED os9 I$Dup | |
432 bcs L030D | |
433 ldb ,s | |
434 sta b,u | |
435 lda ,s | |
436 os9 I$Close | |
437 lda $01,s | |
438 bita #$02 | |
439 bne L0306 | |
440 os9 I$Open | |
441 bra L030B | |
10 | 442 L0306 ldb #PREAD.+READ.+WRITE. |
0 | 443 os9 I$Create |
444 L030B stb $01,s | |
445 L030D puls pc,b,a | |
12 | 446 |
447 StkSiz ldb #$0D | |
0 | 448 stb -$01,x |
449 ldb <u0003 | |
450 bne L02BE | |
451 lbsr L04CA | |
10 | 452 eora #'K |
0 | 453 anda #$DF |
454 bne L0328 | |
455 leax $01,x | |
456 lda #$04 | |
457 mul | |
458 tsta | |
459 bne L02BE | |
460 L0328 stb <u0003 | |
461 lbra L01E9 | |
12 | 462 Return leax -$01,x |
0 | 463 lbsr L03C7 |
464 bra L0337 | |
12 | 465 NextCmd2 lbsr L03C3 |
0 | 466 L0337 bcs L034A |
467 lbsr L028F | |
468 bsr L035C | |
469 L033E bcs L034A | |
470 lbsr L01E9 | |
471 cmpa #$0D | |
472 bne L0349 | |
473 leas $04,s | |
474 L0349 clrb | |
475 L034A lbra L028F | |
12 | 476 Backgrnd lbsr L03C3 |
0 | 477 bcs L034A |
478 bsr L034A | |
479 ldb #$26 | |
480 lbsr L0495 | |
481 bra L033E | |
12 | 482 Wait clra |
0 | 483 L035C pshs a |
484 L035E os9 F$Wait | |
485 tst <u000E | |
486 beq L0376 | |
487 ldb <u000E | |
10 | 488 cmpb #S$Abort |
0 | 489 bne L038E |
490 lda ,s | |
491 beq L038E | |
492 os9 F$Send | |
493 clr ,s | |
494 bra L035E | |
495 L0376 bcs L0392 | |
496 cmpa ,s | |
497 beq L038E | |
498 tst ,s | |
499 beq L0383 | |
500 tstb | |
501 beq L035E | |
502 L0383 pshs b | |
503 bsr L034A | |
504 ldb #$2D | |
505 lbsr L0495 | |
506 puls b | |
507 L038E tstb | |
508 beq L0392 | |
509 coma | |
510 L0392 puls pc,a | |
10 | 511 L0394 lda #Prgrm+Objct |
0 | 512 ldb <u0003 |
513 ldx <u0004 | |
514 ldy <u0006 | |
515 ldu <u0008 | |
516 rts | |
10 | 517 L03A0 lda #EXEC. |
0 | 518 os9 I$Open |
519 bcs L03FE | |
520 leax <u0013,u | |
521 ldy #$000D | |
522 os9 I$Read | |
523 pshs b,cc | |
524 os9 I$Close | |
525 puls b,cc | |
526 lbcs L045F | |
527 lda $06,x | |
528 ldy $0B,x | |
529 bra L03D7 | |
530 L03C3 lda #$0D | |
531 sta -$01,x | |
532 L03C7 pshs u,y,x | |
533 clra | |
534 ldx <u0004 | |
535 os9 F$Link | |
536 bcs L03A0 | |
537 ldy u000B,u | |
538 os9 F$UnLink | |
10 | 539 L03D7 cmpa #Prgrm+Objct |
0 | 540 beq L0425 |
541 sty <u000A | |
542 leax >L0013,pcr | |
543 L03E2 tst ,x | |
544 beq L045D | |
545 cmpa ,x+ | |
546 beq L03F0 | |
547 L03EA tst ,x+ | |
548 bpl L03EA | |
549 bra L03E2 | |
550 L03F0 ldd <u0008 | |
551 subd <u0004 | |
552 addd <u0006 | |
553 std <u0006 | |
554 ldd <u0004 | |
555 std <u0008 | |
556 bra L0423 | |
557 L03FE ldx <u0006 | |
558 leax $05,x | |
559 stx <u0006 | |
560 ldx <u0004 | |
561 ldu $04,s | |
12 | 562 lbsr InRedir |
0 | 563 bcs L045F |
564 ldu <u0008 | |
565 ldd #$5820 | |
566 std ,--u | |
567 ldd #$5020 | |
568 std ,--u | |
569 ldb #$2D | |
570 stb ,-u | |
571 stu <u0008 | |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
572 leax >name,pcr |
0 | 573 L0423 stx <u0004 |
574 L0425 ldx <u0004 | |
10 | 575 lda #Prgrm+Objct |
0 | 576 os9 F$Link |
577 bcc L0433 | |
578 os9 F$Load | |
579 bcs L045F | |
580 L0433 pshs u | |
581 tst <u0003 | |
582 bne L0442 | |
583 ldd u000B,u | |
584 addd <u000A | |
585 addd #$00FF | |
586 sta <u0003 | |
587 L0442 lbsr L0394 | |
588 os9 F$Fork | |
589 puls u | |
590 pshs b,cc | |
591 bcs L0454 | |
592 ldx #$0001 | |
593 os9 F$Sleep | |
594 L0454 clr <u0004 | |
595 clr <u0005 | |
596 os9 F$UnLink | |
597 puls pc,u,y,x,b,cc | |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
598 |
10 | 599 L045D ldb #E$NEMod |
0 | 600 L045F coma |
601 puls pc,u,y,x | |
1
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
602 |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
603 L0462 fcc "/pipe" |
d4eb10b30e72
Disassembled and commented shell.asm, removed shell binary
boisy
parents:
0
diff
changeset
|
604 fcb C$CR |
12 | 605 Pipe pshs x |
10 | 606 leax <L0462,pcr |
607 ldd #$0103 | |
608 lbsr L02DB | |
609 puls x | |
610 bcs L04C9 | |
611 lbsr L03C3 | |
612 bcs L04C9 | |
613 lda ,u | |
614 bne L0487 | |
0 | 615 os9 I$Dup |
616 bcs L04C9 | |
617 sta ,u | |
618 L0487 clra | |
619 os9 I$Close | |
620 lda #$01 | |
621 os9 I$Dup | |
622 lda #$01 | |
623 lbra L029D | |
10 | 624 |
0 | 625 L0495 pshs y,x,b,a |
626 pshs y,x,b | |
627 leax $01,s | |
628 ldb #$2F | |
629 L049D incb | |
630 suba #$64 | |
631 bcc L049D | |
632 stb ,x+ | |
633 ldb #$3A | |
634 L04A6 decb | |
635 adda #$0A | |
636 bcc L04A6 | |
637 stb ,x+ | |
638 adda #$30 | |
639 ldb #$0D | |
640 std ,x | |
641 leax ,s | |
642 lbsr L00BF | |
643 leas $05,s | |
644 puls pc,y,x,b,a | |
12 | 645 |
646 Kill bsr L04CA | |
0 | 647 cmpb #$02 |
648 bcs L04E5 | |
649 tfr b,a | |
10 | 650 ldb #S$Kill |
0 | 651 os9 F$Send |
652 L04C9 rts | |
653 L04CA clrb | |
10 | 654 |
0 | 655 L04CB lda ,x+ |
656 suba #$30 | |
657 cmpa #$09 | |
658 bhi L04DC | |
659 pshs a | |
660 lda #$0A | |
661 mul | |
662 addb ,s+ | |
663 bcc L04CB | |
664 L04DC lda ,-x | |
665 bcs L04E3 | |
666 tstb | |
667 bne L04C9 | |
668 L04E3 leas $02,s | |
669 L04E5 lbra L02BE | |
12 | 670 SetPr bsr L04CA |
0 | 671 stb <u0012 |
672 lbsr L01E9 | |
673 bsr L04CA | |
674 lda <u0012 | |
675 os9 F$SPrior | |
676 rts | |
10 | 677 |
0 | 678 emod |
679 eom equ * | |
10 | 680 end |