annotate level1/cmds/park.asm @ 1287:10957d54bf16

Made all modules rev 0
author boisy
date Sat, 30 Aug 2003 20:16:51 +0000
parents d049083f7ab0
children 84ea83668304
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 *
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
6 * Ed. Comments Who YY/MM/DD
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
7 * ------------------------------------------------------------------
200
e9ce43cc215e Made major changes to headers for consistency and identification
boisy
parents: 197
diff changeset
8 * 1 From Tandy OS-9 Level One VR 02.00.00
e9ce43cc215e Made major changes to headers for consistency and identification
boisy
parents: 197
diff changeset
9 * 2 Changed name to a mixture of upper/lowercase BGP 02/07/13
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
10
197
089587ab2d8f Enhanced comments
boisy
parents: 127
diff changeset
11 nam Park
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
12 ttl Park a hard drive
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
13
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
14 * 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
15
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
16 ifp1
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
17 use defsfile
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
18 endc
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
19
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
20 DOHELP set 0
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
21
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
22 tylg set Prgrm+Objct
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
23 atrv set ReEnt+rev
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
24 rev set $01
200
e9ce43cc215e Made major changes to headers for consistency and identification
boisy
parents: 197
diff changeset
25 edition set 2
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
26
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
27 mod eom,name,tylg,atrv,start,size
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
28
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
29 org 0
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
30 parmptr rmb 2
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
31 devname rmb 20
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
32 devbuff rmb 502
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
33 size equ .
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
34
197
089587ab2d8f Enhanced comments
boisy
parents: 127
diff changeset
35 name fcs /Park/
200
e9ce43cc215e Made major changes to headers for consistency and identification
boisy
parents: 197
diff changeset
36 fcb edition
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
37
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
38 IFNE DOHELP
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
39 HelpMsg fcb C$LF
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
40 fcc "Use: Park <devname> [...]"
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
41 fcb C$LF
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
42 fcc " To park hard disk heads"
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
43 fcb C$LF
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
44 fcc " on inner track of drive"
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
45 fcb C$LF,C$CR
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
46 HelpMsgL equ *-HelpMsg
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
47 ENDC
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
48
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
49 Parked fcc " has been parked. "
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
50 fcb C$CR
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
51 ParkedLen equ *-Parked
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 NoOpen fcc " cannot be opened."
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 NoOpenL equ *-NoOpen
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 NoPark fcc " has not been parked."
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 NoParkL equ *-NoPark
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
60
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
61 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
62 cmpa #C$CR CR?
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
63 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
64 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
65 bne ShowHelp branch if not
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
66 bsr CopyDev copy device name
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
67 lda #READ. read permission
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
68 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
69 bcs OpenErr branch if error
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
70 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
71 os9 I$SetStt do it!
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
72 bcs NotPark branch if error
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
73 os9 I$Close close path
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
74 bsr ShowDev show device name
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
75 leax >Parked,pcr
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
76 ldy #ParkedLen
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
77 WriteMsg os9 I$WritLn
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
78 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
79 lda ,x get char
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
80 cmpa #C$CR CR?
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
81 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
82 ExitOk clrb
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
83 os9 F$Exit
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
84 ShowHelp equ *
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
85 IFNE DOHELP
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
86 lda #2 to stderr...
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
87 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
88 ldy #HelpMsgL get length
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
89 os9 I$WritLn then write
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
90 ENDC
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
91 bra ExitOk and exit
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
92
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
93 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
94 lda #2 to stderr
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
95 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
96 os9 I$Write write it
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
97 rts
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
98
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
99 OpenErr bsr ShowDev show device name
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
100 leax >NoOpen,pcr
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
101 ldy #NoOpenL
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
102 bra WriteMsg write open error
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
103
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
104 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
105 bsr ShowDev show device name
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
106 leax >NoPark,pcr
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
107 ldy #NoParkL
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
108 bra WriteMsg write not parked message
197
089587ab2d8f Enhanced comments
boisy
parents: 127
diff changeset
109
089587ab2d8f Enhanced comments
boisy
parents: 127
diff changeset
110 * Skip spaces
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
111 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
112 cmpa #C$SPAC space?
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
113 bne L0121 branch if not
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
114 leax 1,x else advance
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
115 bra SkipSpcs and get next char
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
116 L0121 rts
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
117
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
118 CopyDev clrb
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
119 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
120 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
121 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
122 cmpa #C$SPAC space?
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
123 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
124 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
125 incb inc b
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
126 bra CopyX2Y and continue copy
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
127 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
128 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
129 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
130 bsr SkipSpcs skip any spaces
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
131 stx <parmptr save updated pointer
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
132 clra
915
d049083f7ab0 Removed seemlngly useless variable and instructions to save the path to the device.
boisy
parents: 200
diff changeset
133 std <devbuff,u save pathlist length
127
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
134 puls pc,x
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
135
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
136 emod
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
137 eom equ *
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
138 end
78c06629559c Added from OS-9 Level One V2 disk 2
boisy
parents:
diff changeset
139