Mercurial > hg > Members > kono > nitros9-code
annotate level1/cmds/iniz.asm @ 826:6c56dfe1de1c
Added comments
author | boisy |
---|---|
date | Tue, 14 Jan 2003 02:29:34 +0000 |
parents | e9ce43cc215e |
children | 6653afab1671 |
rev | line source |
---|---|
96 | 1 ******************************************************************** |
2 * Iniz - Initialize a device | |
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:
189
diff
changeset
|
8 * 3 From Tandy OS-9 Level Two VR 02.00.01 |
96 | 9 |
10 nam Iniz | |
11 ttl Initialize a device | |
12 | |
189 | 13 * Disassembled 98/09/10 22:56:37 by Disasm v1.6 (C) 1988 by RML |
96 | 14 |
15 ifp1 | |
16 use defsfile | |
17 endc | |
18 | |
19 tylg set Prgrm+Objct | |
20 atrv set ReEnt+rev | |
21 rev set $01 | |
189 | 22 edition set 3 |
96 | 23 |
24 mod eom,name,tylg,atrv,start,size | |
826 | 25 |
26 org 0 | |
96 | 27 u0000 rmb 2 |
826 | 28 readbuf rmb 330 |
96 | 29 size equ . |
30 | |
31 name fcs /Iniz/ | |
189 | 32 fcb edition |
96 | 33 |
826 | 34 start lda ,x get command line char |
35 cmpa #C$CR CR? | |
36 beq ReadnInz branch if so | |
37 bsr FindDevc skip over spaces | |
38 bra ExitOk exit ok | |
39 L001C bsr FindDevc skip over spaces | |
40 ReadnInz bsr ReadLine | |
41 bcs CheckEOF | |
96 | 42 lda ,x |
43 cmpa #C$CR | |
44 bne L001C | |
45 ldb #E$EOF | |
826 | 46 CheckEOF cmpb #E$EOF end of file? |
47 bne ExitOk branch if not | |
48 ExitOk clrb | |
96 | 49 os9 F$Exit |
826 | 50 |
51 ReadLine clra | |
52 leax readbuf,u | |
96 | 53 ldy #80 |
54 os9 I$ReadLn | |
55 bcc L003E | |
56 L003E rts | |
826 | 57 |
58 FindDevc lda #C$SPAC load A with space | |
59 SkipLoop cmpa ,x+ space at X? | |
60 beq SkipLoop keep going if so | |
61 leax -$01,x else back up X | |
62 stx <u0000 and save | |
63 lda #PDELIM get path delim | |
64 cmpa ,x is this char at X? | |
65 bne L0051 branch if not | |
66 leax 1,x else skip over | |
189 | 67 L0051 clra |
826 | 68 os9 I$Attach attach to the device at X |
69 bcs L0064 branch if error | |
70 lda ,x+ get char at X | |
71 cmpa #C$COMA comma? | |
72 beq FindDevc branch if so | |
73 lda ,-x get byte at X-1 | |
74 cmpa #C$CR CR? | |
75 bne FindDevc branch if not | |
96 | 76 rts |
826 | 77 |
78 L0064 pshs b save error code | |
79 lda #$02 stderr | |
96 | 80 ldx <u0000 |
81 ldy #80 | |
82 os9 I$WritLn | |
826 | 83 puls b pull error code from stack |
84 os9 F$PErr print error | |
96 | 85 rts |
86 | |
87 emod | |
88 eom equ * | |
89 end |