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