annotate level1/cmds/iniz.asm @ 826:6c56dfe1de1c

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