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