127
|
1 ********************************************************************
|
|
2 * PARK - Park a hard drive
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
|
6 * Ed. Comments Who YY/MM/DD
|
|
7 * ------------------------------------------------------------------
|
|
8 * 1 Original Tandy/Microware version
|
|
9
|
|
10 nam PARK
|
|
11 ttl Park a hard drive
|
|
12
|
|
13 * Disassembled 02/07/06 21:41:10 by Disasm v1.6 (C) 1988 by RML
|
|
14
|
|
15 ifp1
|
|
16 use defsfile
|
|
17 endc
|
|
18
|
|
19 tylg set Prgrm+Objct
|
|
20 atrv set ReEnt+rev
|
|
21 rev set $01
|
|
22
|
|
23 mod eom,name,tylg,atrv,start,size
|
|
24
|
|
25 u0000 rmb 1
|
|
26 u0001 rmb 2
|
|
27 u0003 rmb 20
|
|
28 u0017 rmb 502
|
|
29 size equ .
|
|
30
|
|
31 name fcs /PARK/
|
|
32 fcb $01
|
|
33
|
|
34 HelpMsg fcb C$LF
|
|
35 fcc "Use: PARK </devname> .... "
|
|
36 fcb C$LF
|
|
37 fcc " To park hard disk heads"
|
|
38 fcb C$LF
|
|
39 fcc " on inner track of drive"
|
|
40 fcb C$LF,C$CR
|
|
41 HelpMsgL equ *-HelpMsg
|
|
42
|
|
43 Parked fcc " has been parked. "
|
|
44 fcb C$CR
|
|
45 ParkedLen equ *-Parked
|
|
46
|
|
47 NoOpen fcc " cannot be opened."
|
|
48 fcb C$CR
|
|
49 NoOpenL equ *-NoOpen
|
|
50
|
|
51 NoPark fcc " has not been parked."
|
|
52 fcb C$CR
|
|
53 NoParkL equ *-NoPark
|
|
54
|
|
55 start bsr L0117
|
|
56 cmpa #C$CR
|
|
57 beq L00E0
|
|
58 L00AE cmpa #'/
|
|
59 bne L00E0
|
|
60 bsr L0122
|
|
61 lda #READ.
|
|
62 os9 I$Open
|
|
63 bcs L00FA
|
|
64 ldb #SS.SQD
|
|
65 os9 I$SetStt
|
|
66 bcs L0106
|
|
67 lda <u0000
|
|
68 os9 I$Close
|
|
69 bsr L00EF
|
|
70 leax >Parked,pcr
|
|
71 ldy #ParkedLen
|
|
72 L00D1 os9 I$WritLn
|
|
73 ldx <u0001
|
|
74 lda ,x
|
|
75 cmpa #C$CR
|
|
76 bne L00AE
|
|
77 L00DC clrb
|
|
78 os9 F$Exit
|
|
79 L00E0 lda #$02
|
|
80 leax >HelpMsg,pcr
|
|
81 ldy #HelpMsgL
|
|
82 os9 I$WritLn
|
|
83 bra L00DC
|
|
84 L00EF leax u0003,u
|
|
85 lda #$02
|
|
86 ldy <u0017
|
|
87 os9 I$Write
|
|
88 rts
|
|
89 L00FA bsr L00EF
|
|
90 leax >NoOpen,pcr
|
|
91 ldy #NoOpenL
|
|
92 bra L00D1
|
|
93 L0106 lda <u0000
|
|
94 os9 I$Close
|
|
95 bsr L00EF
|
|
96 leax >NoPark,pcr
|
|
97 ldy #NoParkL
|
|
98 bra L00D1
|
|
99 L0117 lda ,x
|
|
100 cmpa #C$SPAC
|
|
101 bne L0121
|
|
102 leax 1,x
|
|
103 bra L0117
|
|
104 L0121 rts
|
|
105
|
|
106 L0122 clrb
|
|
107 leay u0003,u
|
|
108 pshs y
|
|
109 L0127 lda ,x+
|
|
110 cmpa #C$SPAC
|
|
111 bls L0132
|
|
112 sta ,y+
|
|
113 incb
|
|
114 bra L0127
|
|
115 L0132 lda #'@
|
|
116 sta ,y+
|
|
117 leax -1,x
|
|
118 bsr L0117
|
|
119 stx <u0001
|
|
120 clra
|
|
121 std <u0017,u
|
|
122 puls pc,x
|
|
123
|
|
124 emod
|
|
125 eom equ *
|
|
126 end
|
|
127
|