annotate level1/modules/ioman.asm @ 2242:2a889a511f0a

Adding Aaron Wolfe's DriveWire work
author boisy
date Thu, 24 Dec 2009 01:16:31 +0000
parents 6cd590fc076f
children f91dc5c378f6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1 ********************************************************************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
2 * IOMan - OS-9 Level One V2 I/O Manager module
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
3 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
4 * $Id$
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
5 *
1499
6cd590fc076f Fixed comments
boisy
parents: 1287
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
6cd590fc076f Fixed comments
boisy
parents: 1287
diff changeset
7 * Comment
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
8 * ------------------------------------------------------------------
1499
6cd590fc076f Fixed comments
boisy
parents: 1287
diff changeset
9 * 11 ????/??/??
6cd590fc076f Fixed comments
boisy
parents: 1287
diff changeset
10 * From Tandy OS-9 Level One VR 02.00.00
6cd590fc076f Fixed comments
boisy
parents: 1287
diff changeset
11 *
6cd590fc076f Fixed comments
boisy
parents: 1287
diff changeset
12 * 12 2002/05/11 Boisy G. Pitre
6cd590fc076f Fixed comments
boisy
parents: 1287
diff changeset
13 * I/O Queue sort bug and I$Attach static storage premature deallocation
6cd590fc076f Fixed comments
boisy
parents: 1287
diff changeset
14 * bug fixed.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16 nam IOMan
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17 ttl OS-9 Level One V2 I/O Manager module
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
18
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20 use defsfile
253
762792d92c57 Slight changes to source
boisy
parents: 201
diff changeset
21 use scfdefs
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
23
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24 tylg set Systm+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25 atrv set ReEnt+rev
1287
10957d54bf16 Made all modules rev 0
boisy
parents: 253
diff changeset
26 rev set $00
75
ce04e3883dec Fixed I$Detach Static Storage Wipeout Bug
boisy
parents: 0
diff changeset
27 * edition 11 = Stock OS-9 Level One Vr. 2.00 IOMan
ce04e3883dec Fixed I$Detach Static Storage Wipeout Bug
boisy
parents: 0
diff changeset
28 * edition 12 = IO Queue sort bug fixed, IAttach bug fixed
ce04e3883dec Fixed I$Detach Static Storage Wipeout Bug
boisy
parents: 0
diff changeset
29 edition equ 12
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31 mod eom,name,tylg,atrv,IOManEnt,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35 name fcs /IOMan/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
37
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
38 * IOMan is called from OS9p2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
39 IOManEnt equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40 * allocate device and polling tables
79
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
41 ldx <D.Init get pointer to init module
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
42 lda PollCnt,x grab number of polling entries
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
43 ldb #POLSIZ and size per entry
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
44 mul D = size of all entries in bytes
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
45 pshs b,a save off
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
46 lda DevCnt,x get device table count in init mod
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
47 ldb #DEVSIZ get size per dev table entry
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
48 mul D = size of all entires in bytes
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
49 pshs b,a save off
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
50 addd 2,s add devsize to polsiz
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
51 addd #$0018 add in ???
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
52 addd #$00FF bring up to next page
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
53 clrb
79
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
54 os9 F$SRqMem ask for the memory
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
55 bcs Crash crash if we can't get it
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
56 * clear allocated mem
79
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
57 leax ,u point to dev table
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
58 L0033 clr ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 subd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
60 bhi L0033
79
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
61 stu <D.PolTbl U = pointer to polling table
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
62 ldd ,s++ get dev table size
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
63 leax d,u point X past polling table to dev table
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
64 stx <D.DevTbl save off X to system vars
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
65 addd ,s++ grab poll table size
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66 leax d,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 stx <D.CLTB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68 ldx <D.PthDBT
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69 os9 F$All64
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 bcs Crash
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 stx <D.PthDBT
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
72 os9 F$Ret64
79
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
73 leax >DPoll,pcr get address of IRQ poll routine
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
74 stx <D.Poll save in statics
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
75 * install I/O system calls
79
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
76 leay <IOCalls,pcr point to I/O calls
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
77 os9 F$SSvc install them
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
78 rts return to OS9p2
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
80 Crash jmp [>$FFFE]
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
81
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
82 IOCalls fcb $7F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
83 fdb UsrIO-*-2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 fcb F$Load
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
86 fdb FLoad-*-2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88 fcb F$PErr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
89 fdb FPErr-*-2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
90
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91 fcb F$IOQu+$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
92 fdb FIOQu-*-2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
93
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94 fcb $FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
95 fdb SysIO-*-2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
96
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
97 fcb F$IRQ+$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
98 fdb FIRQ-*-2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
99
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
100 fcb F$IODel+$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
101 fdb FIODel-*-2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
102
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
103 fcb $80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
105 FIODel ldx R$X,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
106 ldu <D.Init
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
107 ldb DevCnt,u get device count
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
108 ldu <D.DevTbl
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
109 L0083 ldy V$DESC,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
110 beq L0094
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 cmpx V$DESC,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 beq L009B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113 cmpx V$DRIV,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 beq L009B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115 cmpx V$FMGR,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
116 beq L009B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
117 L0094 leau DEVSIZ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
118 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
119 bne L0083
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
120 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
121 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122 L009B comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 ldb #E$ModBsy
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 UsrIODis fdb IAttach-UsrIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
127 fdb IDetach-UsrIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 fdb IDup-UsrIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 fdb IUsrCall-UsrIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
130 fdb IUsrCall-UsrIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
131 fdb IMakDir-UsrIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
132 fdb IChgDir-UsrIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
133 fdb IDelete-UsrIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
134 fdb UISeek-UsrIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
135 fdb UIRead-UsrIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
136 fdb UIWrite-UsrIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
137 fdb UIRead-UsrIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
138 fdb UIWrite-UsrIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
139 fdb UIGetStt-UsrIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
140 fdb UISeek-UsrIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
141 fdb UIClose-UsrIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
142 fdb IDeletX-UsrIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
143
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
144 SysIODis fdb IAttach-SysIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
145 fdb IDetach-SysIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
146 fdb SIDup-SysIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
147 fdb ISysCall-SysIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
148 fdb ISysCall-SysIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
149 fdb IMakDir-SysIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150 fdb IChgDir-SysIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
151 fdb IDelete-SysIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
152 fdb SISeek-SysIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
153 fdb SIRead-SysIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
154 fdb SIWrite-SysIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
155 fdb SIRead-SysIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
156 fdb SIWrite-SysIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
157 fdb SIGetStt-SysIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
158 fdb SISeek-SysIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
159 fdb SIClose-SysIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
160 fdb IDeletX-SysIODis
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
161
79
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
162
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
163 * Entry to User and System I/O dispatch table
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
164 * B = I/O system call code
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
165 UsrIO leax <UsrIODis,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
166 bra IODsptch
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
167 SysIO leax <SysIODis,pcr
79
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
168 IODsptch cmpb #I$DeletX compare with last I/O call
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
169 bhi L00FA branch if greater
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
170 pshs b
79
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
171 lslb multiply by 2
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
172 ldd b,x offset
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
173 leax d,x get address of routine
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
174 puls b
79
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
175 jmp ,x jump to it!
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
176 L00FA comb we get here if illegal I/O code
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
177 ldb #E$UnkSvc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
178 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
179
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
180 IAttach ldb #$11
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
181 L0100 clr ,-s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
182 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
183 bpl L0100
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
184 stu <$10,s caller regs
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
185 lda R$A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
186 sta $09,s device mode
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
187 ldx R$X,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
188 lda #Devic+0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
189 os9 F$Link link to device desc.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
190 bcs L0139
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
191 stu $04,s address of mod hdr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
192 ldy <$10,s get caller regs
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
193 stx R$X,y save updated ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
194 ldd M$Port+1,u get port addr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
195 std $0C,s save on stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
196 ldd M$PDev,u get driver name
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
197 leax d,u point X to driver name
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
198 lda #Drivr+0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
199 os9 F$Link link to driver
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
200 bcs L0139
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
201 stu ,s save driver addr on stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
202 ldu $04,s get addr of dev desc.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
203 ldd M$FMgr,u get file mgr name
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
204 leax d,u point X to fmgr name
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
205 lda #FlMgr+0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
206 os9 F$Link link to fmgr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
207 L0139 bcc L0149
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
208 * error on attach, so detach
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
209 L013B stb <$11,s save fmgr addr on stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
210 leau ,s point U to S
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
211 os9 I$Detach
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
212 leas <$11,s clean up stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
213 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
214 puls pc,b return to caller
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
215 L0149 stu $06,s save fmgr addr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
216 ldx <D.Init
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
217 ldb DevCnt,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
218 lda DevCnt,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
219 ldu D.DevTbl
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
220 L0153 ldx V$DESC,u get desc addr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
221 beq L0188
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
222 cmpx $04,s same?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
223 bne L016E branch if not
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
224 ldx V$STAT,u get stat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
225 bne L016C branch if zero
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
226 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
227 lda V$USRS,u get user count
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
228 beq L0168
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
229 os9 F$IOQu
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
230 L0168 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
231 bra L0153
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
232 L016C stu $0E,s save dev entry on stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
233 L016E ldx V$DESC,u get dev desc ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
234 ldy M$Port+1,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
235 cmpy $0C,s compare to port addr on stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
236 bne L0188
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
237 ldx V$DRIV,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
238 cmpx ,s compare to driver addr on stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
239 bne L0188
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
240 ldx V$STAT,u get static
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
241 stx $02,s save static on stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
242 tst V$USRS,u test user count
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
243 beq L0188 branch if zero
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
244 sta $0A,s store on stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
245 L0188 leau DEVSIZ,u go to next entry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
246 decb decrement count
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
247 bne L0153 go back to loop if not zero
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
248 ldu $0E,s get dev entry off stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
249 lbne L01E6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
250 ldu D.DevTbl
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
251 L0195 ldx V$DESC,u get dev desc ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
252 beq L01A6 branch if zero
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
253 leau DEVSIZ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
254 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
255 bne L0195 continue loop
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
256 ldb #E$DevOvf device table overflow
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
257 bra L013B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
258 L01A2 ldb #E$BMode bad mode
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
259 bra L013B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
260 L01A6 ldx $02,s get static storage off stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
261 lbne L01DD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
262 stu $0E,s save off dev entry on stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
263 ldx ,s get driver addr off stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
264 ldd M$Mem,x get memory requirement
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
265 addd #$00FF round up to next page
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
266 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
267 os9 F$SRqMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
268 lbcs L013B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
269 stu $02,s save off on stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
270 L01BF clr ,u+ clear static mem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
271 subd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
272 bhi L01BF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
273 ldd $0C,s get port addr off stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
274 ldu $02,s get static storage ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
275 clr V.PAGE,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
276 std V.PORT,u save addr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
277 ldy $04,s get dev desc addr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
278 ldx ,s get driver addr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
279 ldd M$Exec,x get driver exec
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
280 jsr d,x call Init routine
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
281 lbcs L013B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
282 ldu $0E,s get dev entry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
283 L01DD ldb #$08 copy 8 bytes from stack to dev entry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
284 L01DF lda b,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
285 sta b,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
286 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
287 bpl L01DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
288 L01E6 ldx V$DESC,u get dev desc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
289 ldb M$Revs,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
290 lda $09,s get device mode off stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
291 anda M$Mode,x AND mode with desc mode
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
292 ldx V$DRIV,u get driver ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
293 anda M$Mode,x AND mode with driver mode
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
294 cmpa $09,s compare with passed mode
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
295 lbne L01A2 branch if error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
296 inc V$USRS,u else inc user count of dev entry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
297 bne L01FE branch if not overflow from 255->0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
298 dec V$USRS,u else dec
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
299 L01FE ldx <$10,s get caller regs
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
300 stu R$U,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
301 leas <$12,s restore stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
302 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
303 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
304
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
305 IDetach ldu R$U,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
306 ldx V$DESC,u
75
ce04e3883dec Fixed I$Detach Static Storage Wipeout Bug
boisy
parents: 0
diff changeset
307 IFEQ edition-11
ce04e3883dec Fixed I$Detach Static Storage Wipeout Bug
boisy
parents: 0
diff changeset
308 * Note: the following lines constitute a bug that can, in certain
ce04e3883dec Fixed I$Detach Static Storage Wipeout Bug
boisy
parents: 0
diff changeset
309 * circumstances, wipe out a device's static storage out from
ce04e3883dec Fixed I$Detach Static Storage Wipeout Bug
boisy
parents: 0
diff changeset
310 * underneath it.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
311 ldb V$USRS,u get user count
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
312 bne L0218 branch if not zero
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
313 pshs u,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
314 ldu V$STAT,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
315 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
316 bra L0254
75
ce04e3883dec Fixed I$Detach Static Storage Wipeout Bug
boisy
parents: 0
diff changeset
317 ELSE
ce04e3883dec Fixed I$Detach Static Storage Wipeout Bug
boisy
parents: 0
diff changeset
318 tst V$USRS,u
ce04e3883dec Fixed I$Detach Static Storage Wipeout Bug
boisy
parents: 0
diff changeset
319 beq IDetach2
ce04e3883dec Fixed I$Detach Static Storage Wipeout Bug
boisy
parents: 0
diff changeset
320 ENDC
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
321 L0218 lda #255
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
322 cmpa V$USRS,u 255 users?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
323 lbeq L0283 branch if so
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
324 dec V$USRS,u else dec user count
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
325 lbne L0271 branch if dec not 0
75
ce04e3883dec Fixed I$Detach Static Storage Wipeout Bug
boisy
parents: 0
diff changeset
326 IDetach2
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
327 ldx <D.Init
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
328 ldb DevCnt,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
329 pshs u,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
330 ldx V$STAT,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
331 clr V$STAT,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
332 clr V$STAT+1,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
333 ldy <D.DevTbl
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
334 L0235 cmpx V$STAT,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
335 beq L0267
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
336 leay DEVSIZ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
337 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
338 bne L0235
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
339 ldy <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
340 ldb P$ID,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
341 stb V$USRS,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
342 ldy V$DESC,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
343 ldu V$DRIV,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
344 exg x,u X pts to driver, U pts to static
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
345 ldd M$Exec,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
346 leax d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
347 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
348 jsr $0F,x call term routine
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
349 L0254 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
350 ldx 1,s get U from stack (dev entry to detach)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
351 ldx V$DRIV,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
352 ldd M$Mem,x get memory requirements
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
353 addd #$00FF round up to next page
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
354 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
355 os9 F$SRtMem return mem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
356 ldx 1,s get U from stack (dev entry to detach)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
357 ldx V$DESC,x get dev desc ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
358 L0267 puls u,b get U,B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
359 ldx V$DESC,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
360 clr V$DESC,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
361 clr V$DESC+1,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
362 clr V$USRS,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
363 L0271 ldy V$DRIV,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
364 ldu V$FMGR,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
365 os9 F$UnLink unlink file manager
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
366 leau ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
367 os9 F$UnLink unlink driver
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
368 leau ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
369 os9 F$UnLink unlink descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
370 L0283 lbsr L04D9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
371 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
372 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
373
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
374 * user state I$Dup
79
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
375 IDup bsr FindPath look for a free path
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
376 bcs IDupRTS branch if error
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
377 pshs x,a else save of
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
378 lda R$A,u get path to dup
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
379 lda a,x point to path to dup
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
380 bsr L02A1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
381 bcs L029D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
382 puls x,b
79
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
383 stb R$A,u save off new path to caller's A
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
384 sta b,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
385 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
386 L029D puls pc,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
387
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
388 * system state I$Dup
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
389 SIDup lda R$A,u
79
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
390 L02A1 lbsr FindPDsc find path descriptor
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
391 bcs IDupRTS exit if error
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
392 inc PD.CNT,y else increment path count
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
393 IDupRTS rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
394
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
395
79
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
396 * Find next free path position in current proc
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
397 * Exit: X = Ptr to proc's path table
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
398 * A = Free path number (valid if carry clear)
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
399 *
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
400 FindPath ldx <D.Proc get ptr to current proc desc
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
401 leax <P$PATH,x point X to proc's path table
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
402 clra start from 0
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
403 L02AF tst a,x this path free?
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
404 beq L02BC branch if so...
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
405 inca else try next path...
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
406 cmpa #NumPaths are we at the end?
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
407 bcs L02AF branch if not
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
408 comb else path table is full
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
409 ldb #E$PthFul
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
410 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
411 L02BC andcc #^Carry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
412 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
413
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
414 IUsrCall bsr FindPath
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
415 bcs L02D1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
416 pshs u,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
417 bsr ISysCall
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
418 puls u,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
419 bcs L02D1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
420 ldb R$A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
421 stb a,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
422 sta R$A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
423 L02D1 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
424
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
425 ISysCall pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
426 ldb R$A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
427 bsr L0349
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
428 bcs L02E6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
429 puls b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
430 lbsr CallFMgr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
431 bcs L02F5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
432 lda PD.PD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
433 sta R$A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
434 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
435 L02E6 puls pc,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
436
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
437 * make directory
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
438 IMakDir pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
439 ldb #DIR.+WRITE.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
440 L02EC bsr L0349
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
441 bcs L02E6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
442 puls b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
443 lbsr CallFMgr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
444 L02F5 pshs b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
445 ldu PD.DEV,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
446 os9 I$Detach
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
447 lda PD.PD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
448 ldx <D.PthDBT
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
449 os9 F$Ret64
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
450 puls pc,b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
451
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
452 * change directory
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
453 IChgDir pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
454 ldb R$A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
455 orb #DIR.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
456 bsr L0349
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
457 bcs L02E6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
458 puls b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
459 lbsr CallFMgr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
460 bcs L02F5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
461 ldu <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
462 ldb PD.MOD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
463 bitb #PWRIT.+PREAD.+UPDAT.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
464 beq L0329
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
465 ldx PD.DEV,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
466 stx <P$DIO,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
467 inc V$USRS,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
468 bne L0329
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
469 dec V$USRS,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
470 L0329 bitb #PEXEC.+EXEC.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
471 beq L0338
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
472 ldx PD.DEV,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
473 stx <P$DIO+6,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
474 inc V$USRS,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
475 bne L0338
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
476 dec V$USRS,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
477 L0338 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
478 bra L02F5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
479
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
480 IDelete pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
481 ldb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
482 bra L02EC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
483
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
484 IDeletX ldb #$87
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
485 pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
486 ldb $01,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
487 bra L02EC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
488
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
489 * create path descriptor and initialize
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
490 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
491 * B = path mode
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
492 L0349 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
493 ldx <D.PthDBT
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
494 os9 F$All64
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
495 bcs L03A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
496 inc PD.CNT,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
497 stb PD.MOD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
498 ldx R$X,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
499 L0358 lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
500 cmpa #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
501 beq L0358
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
502 leax -1,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
503 stx R$X,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
504 ldb PD.MOD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
505 cmpa #PDELIM
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
506 beq L037E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
507 ldx <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
508 bitb #PEXEC.+EXEC.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
509 beq L0373
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
510 ldx <P$DIO+6,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
511 bra L0376
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
512 L0373 ldx <P$DIO,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
513 L0376 beq L03AA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
514 ldx V$DESC,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
515 ldd M$Name,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
516 leax d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
517 L037E pshs y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
518 os9 F$PrsNam
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
519 puls y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
520 bcs L03AA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
521 lda PD.MOD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
522 os9 I$Attach
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
523 stu PD.DEV,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
524 bcs L03AC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
525 ldx V$DESC,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
526 leax <M$Opt,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
527 ldb ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
528 leau <PD.DTP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
529 cmpb #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
530 bls L03A4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
531 ldb #$1F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
532 L03A0 lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
533 sta ,u+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
534 L03A4 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
535 bpl L03A0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
536 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
537 L03A8 puls pc,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
538 L03AA ldb #E$BPNam
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
539 L03AC pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
540 lda ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
541 ldx <D.PthDBT
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
542 os9 F$Ret64
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
543 puls b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
544 coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
545 bra L03A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
546 L03BA lda $01,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
547 cmpa #$10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
548 bcc L03CB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
549 ldx <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
550 leax <$26,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
551 andcc #^Carry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
552 lda a,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
553 bne L03CE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
554 L03CB comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
555 ldb #E$BPNum
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
556 L03CE rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
557
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
558 UISeek bsr L03BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
559 bcc GetPDsc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
560 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
561
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
562 SISeek lda R$A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
563 GetPDsc bsr FindPDsc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
564 lbcc CallFMgr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
565 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
566
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
567 UIRead bsr L03BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
568 bcc L03E4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
569 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
570
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
571 SIRead lda R$A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
572 L03E4 pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
573 ldb #$05
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
574 L03E8 bsr FindPDsc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
575 bcs L040B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
576 bitb $01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
577 beq L0409
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
578 ldd $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
579 beq L03F8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
580 addd $04,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
581 bcs L03FD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
582 L03F8 puls b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
583 lbra CallFMgr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
584 L03FD ldb #$F4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
585 lda ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
586 bita #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
587 beq L040B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
588 ldb #$F5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
589 bra L040B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
590 L0409 ldb #E$BMode
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
591 L040B com ,s+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
592 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
593
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
594 UIWrite bsr L03BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
595 bcc L0415
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
596 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
597
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
598 SIWrite lda R$A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
599 L0415 pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
600 ldb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
601 bra L03E8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
602
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
603
79
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
604 * Find path descriptor of path passed in A
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
605 * Entry:
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
606 * A = path to find
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
607 * Exit:
79
8e207587d6a5 Added more comments
boisy
parents: 75
diff changeset
608 * Y = addr of path desc (if no error)
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
609 FindPDsc pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
610 ldx <D.PthDBT
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
611 os9 F$Find64
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
612 puls x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
613 lbcs L03CB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
614 L0428 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
615
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
616 UIGetStt lbsr L03BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
617 bcc L0431
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
618 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
619
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
620 SIGetStt lda R$A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
621 L0431 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
622 lda R$B,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
623 sta 1,s place in B on stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
624 puls a get A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
625 bsr GetPDsc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
626 puls a A holds func code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
627 pshs b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
628 ldb <PD.DTP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
629 cmpb #DT.NFM
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
630 beq L044D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
631 tsta test func code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
632 beq GSOpt
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
633 cmpa #SS.DevNm
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
634 beq GSDevNm
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
635 L044D puls pc,b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
636 GSOpt leax <PD.DTP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
637 L0452 ldy R$X,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
638 ldb #32
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
639 L0457 lda ,x+ copy 32 bytes from X to Y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
640 sta ,y+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
641 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
642 bne L0457
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
643 leas 2,s fix stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
644 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
645 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
646 * get device name
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
647 GSDevNm ldx PD.DEV,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
648 ldx V$DESC,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
649 ldd M$Name,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
650 leax d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
651 bra L0452
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
652
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
653 UIClose lbsr L03BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
654 bcs L0428
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
655 pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
656 ldb R$A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
657 clr b,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
658 puls b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
659 bra L047D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
660
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
661 SIClose lda R$A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
662 L047D bsr FindPDsc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
663 bcs L0428
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
664 dec PD.CNT,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
665 tst PD.CPR,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
666 bne L0489
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
667 bsr CallFMgr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
668 L0489 tst PD.CNT,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
669 bne L0428
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
670 lbra L02F5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
671
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
672 L0490 os9 F$IOQu
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
673 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
674 ldb <P$Signal,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
675 bne L04A4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
676 L0499 ldx <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
677 ldb P$ID,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
678 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
679 lda PD.CPR,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
680 bne L0490
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
681 stb PD.CPR,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
682 L04A4 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
683
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
684 * B = entry point into FMgr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
685 * Y = path desc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
686 CallFMgr pshs u,y,x,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
687 bsr L0499
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
688 bcs L04C1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
689 stu PD.RGS,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
690 lda <PD.DTP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
691 ldx PD.DEV,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
692 ldx V$FMGR,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
693 ldd M$Exec,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
694 leax d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
695 ldb ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
696 subb #$83 subtract offset from B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
697 lda #$03 size of one entry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
698 mul compute
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
699 jsr d,x branch into file manager
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
700 L04C1 pshs b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
701 bsr L04D9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
702 ldy $05,s get path desc off stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
703 lda <PD.DTP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
704 ldx <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
705 lda P$ID,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
706 cmpa PD.CPR,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
707 bne L04D5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
708 clr PD.CPR,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
709 L04D5 puls b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
710 puls pc,u,y,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
711
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
712 L04D9 pshs y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
713 ldy <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
714 lda <P$IOQN,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
715 beq L04F3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
716 clr <P$IOQN,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
717 ldb #S$Wake
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
718 os9 F$Send
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
719 ldx <D.PrcDBT
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
720 os9 F$Find64
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
721 clr <P$IOQP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
722 L04F3 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
723 puls pc,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
724
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
725 * IRQ install routine
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
726 FIRQ ldx R$X,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
727 ldb ,x B = flip byte
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
728 ldx 1,x X = mask/priority
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
729 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
730 pshs cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
731 pshs x,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
732 ldx <D.Init
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
733 ldb PollCnt,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
734 ldx <D.PolTbl
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
735 ldy R$X,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
736 beq RmvIRQEn
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
737 tst 1,s mask byte
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
738 beq L0572
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
739 decb dec poll table count
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
740 lda #POLSIZ
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
741 mul
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
742 leax d,x point to last entry in table
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
743 lda Q$MASK,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
744 bne L0572
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
745 orcc #FIRQMask+IRQMask
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
746 L051C ldb 2,s get priority byte
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
747 cmpb -1,x compare with prev entry's prior
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
748 bcs L052F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
749 ldb #POLSIZ else copy prev entry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
750 L0524 lda ,-x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
751 sta POLSIZ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
752 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
753 bne L0524
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
754 cmpx <D.PolTbl
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
755 bhi L051C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
756 L052F ldd R$D,u get dev stat reg
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
757 std Q$POLL,x save it
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
758 ldd ,s++ get flip/mask
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
759 sta Q$FLIP,x save flip
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
760 stb Q$MASK,x save mask
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
761 ldb ,s+ get priority
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
762 stb Q$PRTY,x save priority
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
763 ldd R$Y,u get IRQ svc addr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
764 std Q$SERV,x save
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
765 ldd R$U,u get IRQ svc mem ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
766 std Q$STAT,x save
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
767 puls pc,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
768 * remove IRQ poll entry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
769 RmvIRQEn leas 4,s clean stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
770 ldy R$U,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
771 L054C cmpy Q$STAT,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
772 beq L0558
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
773 leax POLSIZ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
774 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
775 bne L054C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
776 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
777 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
778 L0558 pshs b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
779 orcc #FIRQMask+IRQMask
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
780 bra L0565
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
781 L055E ldb POLSIZ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
782 stb ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
783 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
784 bne L055E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
785 L0565 lda #POLSIZ
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
786 dec 1,s dec count
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
787 bne L055E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
788 L056B clr ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
789 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
790 bne L056B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
791 puls pc,a,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
792 L0572 leas 4,s clean stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
793 L0574 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
794 ldb #E$Poll
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
795 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
796
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
797 * IRQ polling routine
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
798 DPoll ldy <D.PolTbl
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
799 ldx <D.Init
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
800 ldb PollCnt,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
801 bra L0586
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
802 L0581 leay POLSIZ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
803 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
804 beq L0574
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
805 L0586 lda [Q$POLL,y]
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
806 eora Q$FLIP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
807 bita Q$MASK,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
808 beq L0581
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
809 ldu Q$STAT,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
810 pshs y,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
811 jsr [<Q$SERV,y]
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
812 puls y,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
813 bcs L0581
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
814 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
815
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
816 * load a module
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
817 FLoad pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
818 ldx R$X,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
819 bsr L05BC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
820 bcs L05BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
821 inc $02,u increment link count
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
822 ldy ,u get mod header addr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
823 ldu ,s get caller regs
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
824 stx R$X,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
825 sty R$U,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
826 lda M$Type,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
827 ldb M$Revs,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
828 std R$D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
829 ldd M$Exec,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
830 leax d,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
831 stx R$Y,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
832 L05BA puls pc,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
833
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
834 L05BC lda #EXEC.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
835 os9 I$Open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
836 bcs L0632
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
837 leas -$0A,s make room on stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
838 ldu #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
839 pshs u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
840 sta 6,s save path
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
841 L05CC ldd 4,s get U (caller regs) from stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
842 bne L05D2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
843 stu 4,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
844 L05D2 lda 6,s get path
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
845 leax 7,s point to place on stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
846 ldy #M$IDSize read M$IDSize bytes
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
847 os9 I$Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
848 bcs L061E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
849 ldd ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
850 cmpd #M$ID12
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
851 bne L061C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
852 ldd $09,s get module size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
853 os9 F$SRqMem allocate mem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
854 bcs L061E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
855 ldb #M$IDSize
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
856 L05F0 lda ,x+ copy over first M$IDSize bytes
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
857 sta ,u+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
858 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
859 bne L05F0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
860 lda $06,s get path
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
861 leax ,u point X at updated U
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
862 ldu $09,s get module size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
863 leay -M$IDSize,u subtract count
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
864 os9 I$Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
865 leax -M$IDSize,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
866 bcs L060B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
867 os9 F$VModul validate module
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
868 bcc L05CC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
869 L060B pshs u,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
870 leau ,x point U at memory allocated
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
871 ldd M$Size,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
872 os9 F$SRtMem return mem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
873 puls u,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
874 cmpb #E$KwnMod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
875 beq L05CC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
876 bra L061E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
877 L061C ldb #E$BMID
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
878 L061E puls u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
879 lda ,s get path
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
880 stb ,s save error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
881 os9 I$Close close path
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
882 ldb ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
883 leas $0A,s clear up stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
884 cmpu #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
885 bne L0632
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
886 coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
887 L0632 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
888
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
889
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
890 ErrHead fcc /ERROR #/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
891 ErrNum equ *-ErrHead
253
762792d92c57 Slight changes to source
boisy
parents: 201
diff changeset
892 fcb $2F,$3A,$30,C$CR
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
893 ErrLen equ *-ErrHead
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
894
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
895 FPErr ldx <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
896 lda <P$PATH+2,x get stderr path
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
897 beq L0674
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
898 leas -ErrLen,s make room on stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
899 * copy error message to stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
900 leax <ErrHead,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
901 leay ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
902 L064C lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
903 sta ,y+
253
762792d92c57 Slight changes to source
boisy
parents: 201
diff changeset
904 cmpa #C$CR
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
905 bne L064C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
906 ldb R$B,u get error #
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
907 L0656 inc ErrNum+0,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
908 subb #$64
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
909 bcc L0656
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
910 L065C dec ErrNum+1,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
911 addb #$0A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
912 bcc L065C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
913 addb #$30
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
914 stb ErrNum+2,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
915 ldx <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
916 leax ,s point to error message
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
917 ldu <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
918 lda <P$PATH+2,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
919 os9 I$WritLn write message
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
920 leas ErrLen,s fix up stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
921 L0674 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
922
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
923 FIOQu ldy <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
924 L0678 lda <P$IOQN,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
925 beq L06A0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
926 cmpa R$A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
927 bne L0699
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
928 clr <P$IOQN,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
929 ldx <D.PrcDBT
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
930 os9 F$Find64
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
931 lbcs L070F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
932 clr <P$IOQP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
933 ldb #S$Wake
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
934 os9 F$Send
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
935 ldu <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
936 bra L06AB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
937 L0699 ldx <D.PrcDBT
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
938 os9 F$Find64
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
939 bcc L0678
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
940 L06A0 lda R$A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
941 ldu <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
942 ldx <D.PrcDBT
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
943 os9 F$Find64
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
944 bcs L070F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
945 L06AB leax ,y X = proc desc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
946 lda <P$IOQN,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
947 beq L06D1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
948 ldx <D.PrcDBT
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
949 os9 F$Find64
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
950 bcs L070F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
951 ldb P$Age,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
952
75
ce04e3883dec Fixed I$Detach Static Storage Wipeout Bug
boisy
parents: 0
diff changeset
953 ifeq edition-11
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
954
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
955 * Note: the following line is a bug
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
956 cmpd P$Age,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
957
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
958 else
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
959
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
960 cmpb P$Age,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
961
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
962 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
963
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
964 bls L06AB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
965 ldb ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
966 stb <P$IOQN,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
967 ldb P$ID,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
968 stb <P$IOQP,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
969 clr <P$IOQP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
970 exg y,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
971 bra L06AB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
972 L06D1 lda P$ID,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
973 sta <P$IOQN,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
974 lda P$ID,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
975 sta <P$IOQP,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
976 ldx #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
977 os9 F$Sleep
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
978 ldu <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
979 lda <P$IOQP,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
980 beq L070C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
981 ldx <D.PrcDBT
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
982 os9 F$Find64
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
983 bcs L070C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
984 lda <P$IOQN,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
985 beq L070C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
986 lda <P$IOQN,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
987 sta <P$IOQN,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
988 beq L070C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
989 clr <P$IOQN,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
990 ldx <D.PrcDBT
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
991 os9 F$Find64
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
992 bcs L070C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
993 lda <P$IOQP,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
994 sta <P$IOQP,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
995 L070C clr <P$IOQP,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
996 L070F rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
997
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
998 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
999 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1000 end