Mercurial > hg > Members > kono > nitros9-code
annotate level2/modules/kernel/fsrqmem.asm @ 2680:9498d2c8d36e lwtools-port
Change unsupported operator in lwasm
Switch >>8 to /256 due to >> not being supported by lwasm.
author | William Astle <lost@l-w.ca> |
---|---|
date | Sun, 10 Jun 2012 14:35:57 -0600 |
parents | 055c774cb633 |
children | 039ddb7c8ad7 |
rev | line source |
---|---|
1145 | 1 ************************************************** |
2 * System Call: F$SRqMem | |
3 * | |
4 * Function: Request memory | |
5 * | |
1634
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
6 * F$SRqMem allocates memory from the system's 64K address space in 256 byte 'pages.' |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
7 * There are 256 of these '256 byte pages' in the system's RAM area (256*256=64K). |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
8 * The allocation map, pointed to by D.SysMem holds one byte per page, making the |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
9 * allocation map itself 256 bytes in size. |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
10 * |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
11 * Memory is allocated from the top of the system RAM map downwards. Rel/Boot/Krn |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
12 * also reside in this area, and are loaded from $ED00-$FFFF. Since this area is |
2122
055c774cb633
Commented out D.SysMAP updating code, as per bug 1783594 on SF
boisy
parents:
2118
diff
changeset
|
13 * always allocated, we start searching for free pages from page $EC downward. |
1634
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
14 * |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
15 * F$SRqMem also updates the system memory map according to 8K DAT blocks. If an |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
16 * empty block is found, this routine re-does the 32 entries in the SMAP table to |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
17 * indicate that they are free. |
1345 | 18 * |
1145 | 19 * Input: D = Byte count |
20 * | |
21 * Output: U = Address of allocated memory area | |
22 * | |
23 * Error: CC = C bit set; B = error code | |
24 * | |
1634
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
25 FSRqMem ldd R$D,u get memory allocation size requested |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
26 addd #$00FF round it up to nearest 256 byte page (e.g. $1FF = $2FE) |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
27 clrb just keep # of pages (and start 8K block #, e.g. $2FE = $200) |
1145 | 28 std R$D,u save rounded version back to user |
1634
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
29 * leay Bt.Start/256,y |
1387 | 30 * leay $20,y skip Block 0 (always reserved for system) |
1145 | 31 * Change to pshs a,b:use 1,s for block # to check, and ,s for TFM spot |
1387 | 32 * incb skip block 0 (always reserved for system) |
33 pshs d reserve a byte & put 0 byte on stack | |
2122
055c774cb633
Commented out D.SysMAP updating code, as per bug 1783594 on SF
boisy
parents:
2118
diff
changeset
|
34 |
055c774cb633
Commented out D.SysMAP updating code, as per bug 1783594 on SF
boisy
parents:
2118
diff
changeset
|
35 |
055c774cb633
Commented out D.SysMAP updating code, as per bug 1783594 on SF
boisy
parents:
2118
diff
changeset
|
36 * IMPORTANT!!! |
055c774cb633
Commented out D.SysMAP updating code, as per bug 1783594 on SF
boisy
parents:
2118
diff
changeset
|
37 * The following code was put in some time back to fix a problem. That problem was not documented |
055c774cb633
Commented out D.SysMAP updating code, as per bug 1783594 on SF
boisy
parents:
2118
diff
changeset
|
38 * so I cannot recall why this code was in place. What it appears to do is reset the system page |
055c774cb633
Commented out D.SysMAP updating code, as per bug 1783594 on SF
boisy
parents:
2118
diff
changeset
|
39 * memory map based upon the state of the system DAT image. |
055c774cb633
Commented out D.SysMAP updating code, as per bug 1783594 on SF
boisy
parents:
2118
diff
changeset
|
40 * This code really slows down F$SRqMem and since that system call is used quite often in the system, |
055c774cb633
Commented out D.SysMAP updating code, as per bug 1783594 on SF
boisy
parents:
2118
diff
changeset
|
41 * I am commenting it out in the hopes that I can remember what the hell I put it in for. -- Boisy |
055c774cb633
Commented out D.SysMAP updating code, as per bug 1783594 on SF
boisy
parents:
2118
diff
changeset
|
42 IFEQ 1 |
055c774cb633
Commented out D.SysMAP updating code, as per bug 1783594 on SF
boisy
parents:
2118
diff
changeset
|
43 ldy <D.SysMem get ptr to SMAP table |
1145 | 44 * This loop updates the SMAP table if anything can be marked as unused |
1634
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
45 L082F ldx <D.SysDAT get pointer to system DAT block list |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
46 lslb adjust block offset for 2 bytes/entry |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
47 ldd b,x get block type/# from system DAT |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
48 cmpd #DAT.Free Unused block? |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
49 beq L0847 yes, mark it free in SMAP table |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
50 ldx <D.BlkMap No, get ptr to MMAP table |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
51 lda d,x Get block marker for 2 meg mem map |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
52 cmpa #RAMinUse Is it in use (not free, ROM or used by module)? |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
53 bne L0848 No, mark it as type it is in SMAP table |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
54 leay 32,y Yes, move to next block in pages |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
55 bra L084F move to next block & try again |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
56 * Free RAM: |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
57 L0847 clra Byte to fill system page map with (0=Not in use) |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
58 * NOT! RAMinUse: |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
59 IFNE H6309 |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
60 L0848 sta ,s Put it on stack |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
61 ldw #$0020 Get size of 8K block in pages |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
62 tfm s,y+ Mark entire block's worth of pages with A |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
63 ELSE |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
64 L0848 ldb #32 count = 32 pages |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
65 L084A sta ,y+ mark the RAM |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
66 decb |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
67 bne L084A |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
68 ENDC |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
69 L084F inc 1,s Bump up to next block to check |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
70 ldb 1,s Get it |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
71 cmpb #DAT.BlCt Done whole 64k system space? |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
72 blo L082F no, keep checking |
2122
055c774cb633
Commented out D.SysMAP updating code, as per bug 1783594 on SF
boisy
parents:
2118
diff
changeset
|
73 ENDC |
055c774cb633
Commented out D.SysMAP updating code, as per bug 1783594 on SF
boisy
parents:
2118
diff
changeset
|
74 |
055c774cb633
Commented out D.SysMAP updating code, as per bug 1783594 on SF
boisy
parents:
2118
diff
changeset
|
75 |
1145 | 76 * Now we can actually attempt to allocate the system RAM requested |
2122
055c774cb633
Commented out D.SysMAP updating code, as per bug 1783594 on SF
boisy
parents:
2118
diff
changeset
|
77 * NOTE: Opt for CoCo/TC9 OS9 ONLY: skip last 256 - Bt.Start pages since |
2118 | 78 * they are: Kernel (REL/BOOT/KRN - 17 pages), vector RAM & I/O (2 pages) |
1145 | 79 * (Already permanently marked @ L01D2) |
80 * At the start, Y is pointing to the end of the SMAP table+1 | |
81 ldx <D.SysMem Get start of table ptr | |
2680
9498d2c8d36e
Change unsupported operator in lwasm
William Astle <lost@l-w.ca>
parents:
2122
diff
changeset
|
82 leay Bt.Start/256,x |
1634
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
83 ldb #32 skip block 0: it's always full |
1145 | 84 abx same size, but faster than leax $20,x |
2122
055c774cb633
Commented out D.SysMAP updating code, as per bug 1783594 on SF
boisy
parents:
2118
diff
changeset
|
85 * leay -(256-(Bt.Start>>8)),y skip Kernel, Vector RAM & I/O (Can't be free) |
1145 | 86 L0857 ldb R$A,u Get # 256 byte pages requested |
87 * Loop (from end of system mem map) to look for # continuous pages requested | |
88 L0859 equ * | |
89 IFNE H6309 | |
90 cmpr x,y We still have any system RAM left to try? | |
91 ELSE | |
1239 | 92 pshs x |
93 cmpy ,s++ | |
1145 | 94 ENDC |
95 bhi L0863 Yes, continue | |
96 comb Exit with No System RAM Error | |
1387 | 97 ldb #E$NoRAM |
1145 | 98 bra L0894 Eat stack & exit |
99 | |
100 L0863 lda ,-y Get page marker (starting @ end of SMAP) | |
101 bne L0857 Used, try next lower page | |
102 decb Found 1 page, dec # pages we need to allocate | |
103 bne L0859 Still more pages needed, check if we can get more | |
1239 | 104 sty ,s Found free contiguous pages, save SMAP entry ptr |
1145 | 105 lda 1,s Get LSB of ptr |
106 lsra Divide by 32 (Calculate start 8K block #) | |
107 lsra | |
108 lsra | |
109 lsra | |
110 lsra | |
111 ldb 1,s Get LSB of ptr again | |
112 andb #%00011111 Keep only within 8K block offset | |
113 addb R$A,u Add # pages requested | |
114 addb #$1F Round up to nearest 8K block | |
115 lsrb Divide by 32 (Calculate end 8K block #) | |
116 lsrb | |
117 lsrb | |
118 lsrb | |
119 lsrb | |
120 ldx <D.SysPrc Get ptr to system proc. dsc. | |
121 lbsr L09BE Allocate an image with our start/end block #'s | |
122 bcs L0894 Couldn't, exit with error | |
123 ldb R$A,u Get # pages requested | |
1634
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
124 * lda #RAMinUse Get SMAP in use flag |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
125 *L088A sta ,y+ Mark all the pages requested as In Use |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
126 L088A inc ,y+ Since RAMinUse is 1, we can save space by INC'ing from 0->1 |
1145 | 127 decb |
128 bne L088A | |
129 lda 1,s Get MSB of ptr to start of newly allocated Sys RAM | |
130 std R$U,u Save for caller | |
131 clrb No error | |
132 L0894 puls u,pc Eat stack (U is changed after it exits) & return | |
133 | |
134 | |
135 ************************************************** | |
136 * System Call: F$SRtMem | |
137 * | |
138 * Function: Return memory | |
139 * | |
140 * Input: U = Address of memory to return | |
141 * D = Number of bytes to return | |
142 * | |
143 * Output: None | |
144 * | |
145 * Error: CC = C bit set; B = error code | |
146 * | |
147 FSRtMem ldd R$D,u get # pages to free up | |
148 beq L08F2 nothing to free, return without error | |
149 addd #$00FF round it up to nearest page | |
150 ldb R$U+1,u get LSB of address | |
151 beq L08A6 it's a even page, skip ahead | |
152 comb set carry | |
153 ldb #E$BPAddr get error code | |
154 rts return | |
155 | |
156 L08A6 ldb R$U,u get MSB of page address | |
157 beq L08F2 not a legal page, return without error | |
158 ldx <D.SysMem get pointer to system memory map | |
159 abx set pointer into map | |
160 L08AD equ * | |
161 IFNE H6309 | |
162 aim #^RAMinUse,,x+ | |
163 ELSE | |
164 ldb ,x | |
165 andb #^RAMinUse | |
166 stb ,x+ | |
167 ENDC | |
168 deca | |
169 bne L08AD | |
170 * Scan DAT image to find memory blocks to free up | |
171 ldx <D.SysDAT get pointer to system DAT image | |
172 IFNE H6309 | |
1239 | 173 lde #DAT.BlCt get # blocks to check |
1145 | 174 ELSE |
175 ldy #DAT.BlCt | |
176 ENDC | |
177 L08BC ldd ,x get block image | |
178 cmpd #DAT.Free is it already free? | |
179 beq L08EC yes, skip to next one | |
180 ldu <D.BlkMap get pointer to MMU block map | |
181 lda d,u get allocation flag for this block: 16-bit offset | |
182 cmpa #RAMinUse being used? | |
183 bne L08EC no, move to next block | |
184 tfr x,d | |
185 subd <D.SysDAT | |
186 lslb | |
187 lslb | |
188 lslb | |
189 lslb | |
190 ldu <D.SysMem get pointer to system map | |
191 IFNE H6309 | |
192 addr d,u | |
193 * Check if we can remove the entire memory block from system map | |
194 ldf #16 get # pages per block/2 | |
195 L08DA ldd ,u++ Either of these 2 pages allocated? | |
196 ELSE | |
197 leau d,u | |
198 ldb #32 | |
199 L08DA lda ,u+ Either of these 2 pages allocated? | |
200 ENDC | |
201 bne L08EC yes, can't free block, skip to next one | |
202 IFNE H6309 | |
203 decf checked all pages? | |
204 ELSE | |
205 decb | |
206 ENDC | |
207 bne L08DA no, keep looking | |
208 ldd ,x get block # into B: could be >$80 | |
209 ldu <D.BlkMap point to allocation table | |
210 IFNE H6309 | |
211 sta d,u clear the block using 16-bit offset | |
212 ELSE | |
213 clr d,u | |
214 ENDC | |
215 ldd #DAT.Free get free block marker | |
216 std ,x save it into DAT image | |
217 L08EC leax 2,x move to next DAT block | |
218 IFNE H6309 | |
219 dece done? | |
220 ELSE | |
221 leay -1,y | |
222 ENDC | |
223 bne L08BC no, keep checking | |
224 L08F2 clrb clear errors | |
225 L08F3 rts return | |
226 | |
1345 | 227 |
228 ************************************************** | |
229 * System Call: F$Boot | |
230 * | |
231 * Function: Bootstrap the system | |
232 * | |
233 * Optimized for size, as it's only called once... | |
234 * | |
235 * Input: None | |
236 * | |
237 * Output: None | |
238 * | |
239 * Error: CC = C bit set; B = error code | |
240 * | |
1634
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
241 FBoot |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
242 lda #'t tried to boot |
1145 | 243 jsr <D.BtBug |
244 coma Set boot flag | |
245 lda <D.Boot we booted once before? | |
246 bne L08F3 Yes, return | |
247 inc <D.Boot Set boot flag | |
248 ldx <D.Init Get ptr to init module if it exists | |
249 beq L0908 it doesn't, point to boot name | |
250 ldd <BootStr,x Get offset to text | |
251 beq L0908 Doesn't exist, get hard coded text | |
252 leax d,x Adjust X to point to boot module | |
253 bra L090C Try & link to module | |
254 | |
255 boot fcs /Boot/ | |
256 | |
257 L0908 leax <boot,pcr | |
258 * Link to module and execute | |
259 L090C lda #Systm+Objct | |
260 os9 F$Link | |
261 bcs L08F3 | |
262 lda #'b calling boot | |
263 jsr <D.BtBug | |
264 jsr ,y load boot file | |
265 bcs L08F3 | |
266 std <D.BtSz save boot file size | |
267 stx <D.BtPtr save start pointer of bootfile | |
268 lda #'b boot returns OK | |
269 jsr <D.BtBug | |
270 | |
271 * added for IOMan system memory extentions | |
1236 | 272 IFNE H6309 |
1145 | 273 ldd M$Name,x grab the name offset |
274 ldd d,x find the first 2 bytes of the first module | |
275 cmpd #$4E69 'Ni' ? (NitrOS9 module?) | |
276 bne not.ext no, not system memory extensions | |
277 ldd M$Exec,x grab the execution ptr | |
278 jmp d,x and go execute the system memory extension module | |
1236 | 279 ENDC |
1145 | 280 |
281 not.ext ldd <D.BtSz | |
282 bsr I.VBlock internal verify block routine | |
283 ldx <D.SysDAT get system DAT pointer | |
284 ldb $0D,x get highest allocated block number | |
285 incb allocate block 0, too | |
286 ldx <D.BlkMap point to the memory block map | |
287 lbra L01DF and go mark the blocks as used. | |
288 | |
1345 | 289 |
290 ************************************************** | |
291 * System Call: F$VBlock | |
292 * | |
293 * Function: ??? | |
294 * | |
295 * Input: D = Size of block to verify | |
296 * X = Start address to verify | |
297 * | |
298 * Output: None | |
299 * | |
300 * Error: CC = C bit set; B = error code | |
301 * | |
1145 | 302 FVBlock ldd R$D,u size of block to verify |
303 ldx R$X,u start address to verify | |
304 | |
305 I.VBlock leau d,x point to end of bootfile | |
306 tfr x,d | |
307 anda #$E0 | |
308 clrb | |
309 pshs d,u | |
310 lsra | |
311 lsra | |
312 lsra | |
313 lsra | |
314 ldy <D.SysDAT get pointer to system DAT | |
315 leay a,y offset to bootfile | |
316 L092D ldd M$ID,x get module ID | |
317 cmpd #M$ID12 legal ID? | |
318 bne L0954 no, keep looking | |
1634
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
319 |
1145 | 320 ldd M$Name,x find name offset pointer |
321 pshs x | |
322 leax d,x | |
1634
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
323 name.prt lda ,x+ get first character of the name |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
324 jsr <D.BtBug print it out |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
325 bpl name.prt |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
326 lda #C$SPAC a space |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
327 jsr <D.BtBug |
5ecf6e023a64
ioman.asm: Fixed bug where descriptor wasn't being unlinked in I$Detach if V$USRS > 0
boisy
parents:
1387
diff
changeset
|
328 puls x |
1145 | 329 |
330 IFNE H6309 | |
331 ldd ,s offset into block | |
332 subr d,x make X=offset into block | |
333 ELSE | |
334 tfr x,d | |
335 subd ,s | |
336 tfr d,x | |
337 ENDC | |
338 tfr y,d | |
339 os9 F$VModul | |
340 IFNE H6309 | |
341 ldw ,s | |
342 leax w,x | |
343 ELSE | |
344 pshs b | |
345 ldd 1,s | |
346 leax d,x | |
347 puls b | |
348 ENDC | |
349 bcc L094E | |
350 cmpb #E$KwnMod | |
351 bne L0954 | |
352 L094E ldd M$Size,x | |
353 leax d,x | |
354 fcb $8C skip 2 bytes | |
355 | |
356 L0954 leax 1,x move to next byte | |
357 L0956 cmpx 2,s gone thru whole bootfile? | |
358 bcs L092D no, keep looking | |
359 leas 4,s purge stack | |
360 clrb | |
361 rts |