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