annotate level1/cmds/park.asm @ 2668:07441dfebc27 lwtools-port

Make tocgen build with lwasm lwasm does not treat a trailing colon as part of the symbol name. Removed trailing colons on symbol references.
author William Astle <lost@l-w.ca>
date Sun, 10 Jun 2012 13:35:44 -0600
parents 84ea83668304
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
1 ********************************************************************
197
089587ab2d8f Enhanced comments
boisy
parents: 127
diff changeset
2 * Park - Park a hard drive
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
3 *
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
4 * $Id$
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
5 *
1325
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 915
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 915
diff changeset
7 * Comment
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
8 * ------------------------------------------------------------------
1325
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 915
diff changeset
9 * 1 ????/??/??
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 915
diff changeset
10 * From Tandy OS-9 Level One VR 02.00.00.
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 915
diff changeset
11 *
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 915
diff changeset
12 * 2 2002/07/13 Boisy G. Pitre
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 915
diff changeset
13 * Changed name to a mixture of upper/lowercase.
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
14
197
089587ab2d8f Enhanced comments
boisy
parents: 127
diff changeset
15 nam Park
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
16 ttl Park a hard drive
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
17
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
18 * Disassembled 02/07/06 21:41:10 by Disasm v1.6 (C) 1988 by RML
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
19
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
20 ifp1
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
21 use defsfile
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
22 endc
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
23
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
24 DOHELP set 0
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
25
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
26 tylg set Prgrm+Objct
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
27 atrv set ReEnt+rev
1325
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 915
diff changeset
28 rev set $00
200
e9ce43cc215e Made major changes to headers for consistency and identification
boisy
parents: 197
diff changeset
29 edition set 2
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
30
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
31 mod eom,name,tylg,atrv,start,size
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
32
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
33 org 0
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
34 parmptr rmb 2
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
35 devname rmb 20
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
36 devbuff rmb 502
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
37 size equ .
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
38
197
089587ab2d8f Enhanced comments
boisy
parents: 127
diff changeset
39 name fcs /Park/
200
e9ce43cc215e Made major changes to headers for consistency and identification
boisy
parents: 197
diff changeset
40 fcb edition
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
41
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
42 IFNE DOHELP
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
43 HelpMsg fcb C$LF
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
44 fcc "Use: Park <devname> [...]"
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
45 fcb C$LF
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
46 fcc " To park hard disk heads"
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
47 fcb C$LF
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
48 fcc " on inner track of drive"
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
49 fcb C$LF,C$CR
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
50 HelpMsgL equ *-HelpMsg
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
51 ENDC
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
52
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
53 Parked fcc " has been parked. "
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
54 fcb C$CR
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
55 ParkedLen equ *-Parked
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
56
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
57 NoOpen fcc " cannot be opened."
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
58 fcb C$CR
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
59 NoOpenL equ *-NoOpen
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
60
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
61 NoPark fcc " has not been parked."
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
62 fcb C$CR
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
63 NoParkL equ *-NoPark
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
64
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
65 start bsr SkipSpcs skip over spaces
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
66 cmpa #C$CR CR?
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
67 beq ShowHelp if so, show help
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
68 NextDev cmpa #PDELIM else is char delim?
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
69 bne ShowHelp branch if not
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
70 bsr CopyDev copy device name
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
71 lda #READ. read permission
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
72 os9 I$Open open path to device
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
73 bcs OpenErr branch if error
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
74 ldb #SS.SQD do park setstat
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
75 os9 I$SetStt do it!
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
76 bcs NotPark branch if error
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
77 os9 I$Close close path
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
78 bsr ShowDev show device name
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
79 leax >Parked,pcr
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
80 ldy #ParkedLen
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
81 WriteMsg os9 I$WritLn
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
82 ldx <parmptr get pointer to command line
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
83 lda ,x get char
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
84 cmpa #C$CR CR?
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
85 bne NextDev if not, park next device
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
86 ExitOk clrb
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
87 os9 F$Exit
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
88 ShowHelp equ *
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
89 IFNE DOHELP
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
90 lda #2 to stderr...
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
91 leax >HelpMsg,pcr point to help message
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
92 ldy #HelpMsgL get length
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
93 os9 I$WritLn then write
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
94 ENDC
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
95 bra ExitOk and exit
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
96
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
97 ShowDev leax devname,u point to device name
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
98 lda #2 to stderr
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
99 ldy <devbuff get length of device
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
100 os9 I$Write write it
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
101 rts
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
102
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
103 OpenErr bsr ShowDev show device name
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
104 leax >NoOpen,pcr
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
105 ldy #NoOpenL
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
106 bra WriteMsg write open error
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
107
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
108 NotPark os9 I$Close close path
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
109 bsr ShowDev show device name
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
110 leax >NoPark,pcr
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
111 ldy #NoParkL
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
112 bra WriteMsg write not parked message
197
089587ab2d8f Enhanced comments
boisy
parents: 127
diff changeset
113
089587ab2d8f Enhanced comments
boisy
parents: 127
diff changeset
114 * Skip spaces
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
115 SkipSpcs lda ,x get char at X
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
116 cmpa #C$SPAC space?
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
117 bne L0121 branch if not
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
118 leax 1,x else advance
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
119 bra SkipSpcs and get next char
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
120 L0121 rts
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
121
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
122 CopyDev clrb
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
123 leay devname,u point to device name
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
124 pshs y and save ptr on stack
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
125 CopyX2Y lda ,x+ get byte at X
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
126 cmpa #C$SPAC space?
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
127 bls L0132 if same or lower, exit loop
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
128 sta ,y+ else save at Y
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
129 incb inc b
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
130 bra CopyX2Y and continue copy
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
131 L0132 lda #PENTIR get ENTIRE char
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
132 sta ,y+ save after copied device
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
133 leax -1,x back up one at X
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
134 bsr SkipSpcs skip any spaces
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
135 stx <parmptr save updated pointer
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
136 clra
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
137 std <devbuff,u save pathlist length
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
138 puls pc,x
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
139
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
140 emod
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
141 eom equ *
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
142 end
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
143