annotate level1/modules/ioman.asm @ 306:c863af5b4ea1

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