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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1145
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
1 **************************************************
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
2 * System Call: F$SRqMem
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
3 *
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
4 * Function: Request memory
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
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
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
18 *
1145
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
19 * Input: D = Byte count
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
20 *
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
21 * Output: U = Address of allocated memory area
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
22 *
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
23 * Error: CC = C bit set; B = error code
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
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
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
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
1451bc7ef0b9 Updates source comments
boisy
parents: 1345
diff changeset
30 * leay $20,y skip Block 0 (always reserved for system)
1145
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
31 * Change to pshs a,b:use 1,s for block # to check, and ,s for TFM spot
1387
1451bc7ef0b9 Updates source comments
boisy
parents: 1345
diff changeset
32 * incb skip block 0 (always reserved for system)
1451bc7ef0b9 Updates source comments
boisy
parents: 1345
diff changeset
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
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
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
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
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
7fca19b7c923 ChangeLog udpated
boisy
parents: 1634
diff changeset
78 * they are: Kernel (REL/BOOT/KRN - 17 pages), vector RAM & I/O (2 pages)
1145
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
79 * (Already permanently marked @ L01D2)
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
80 * At the start, Y is pointing to the end of the SMAP table+1
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
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
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
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
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
86 L0857 ldb R$A,u Get # 256 byte pages requested
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
87 * Loop (from end of system mem map) to look for # continuous pages requested
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
88 L0859 equ *
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
89 IFNE H6309
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
90 cmpr x,y We still have any system RAM left to try?
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
91 ELSE
1239
90bad6d8388c Major changes to bring kernel closer to L2 port
boisy
parents: 1236
diff changeset
92 pshs x
90bad6d8388c Major changes to bring kernel closer to L2 port
boisy
parents: 1236
diff changeset
93 cmpy ,s++
1145
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
94 ENDC
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
95 bhi L0863 Yes, continue
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
96 comb Exit with No System RAM Error
1387
1451bc7ef0b9 Updates source comments
boisy
parents: 1345
diff changeset
97 ldb #E$NoRAM
1145
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
98 bra L0894 Eat stack & exit
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
99
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
100 L0863 lda ,-y Get page marker (starting @ end of SMAP)
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
101 bne L0857 Used, try next lower page
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
102 decb Found 1 page, dec # pages we need to allocate
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
103 bne L0859 Still more pages needed, check if we can get more
1239
90bad6d8388c Major changes to bring kernel closer to L2 port
boisy
parents: 1236
diff changeset
104 sty ,s Found free contiguous pages, save SMAP entry ptr
1145
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
105 lda 1,s Get LSB of ptr
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
106 lsra Divide by 32 (Calculate start 8K block #)
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
107 lsra
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
108 lsra
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
109 lsra
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
110 lsra
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
111 ldb 1,s Get LSB of ptr again
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
112 andb #%00011111 Keep only within 8K block offset
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
113 addb R$A,u Add # pages requested
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
114 addb #$1F Round up to nearest 8K block
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
115 lsrb Divide by 32 (Calculate end 8K block #)
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
116 lsrb
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
117 lsrb
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
118 lsrb
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
119 lsrb
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
120 ldx <D.SysPrc Get ptr to system proc. dsc.
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
121 lbsr L09BE Allocate an image with our start/end block #'s
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
122 bcs L0894 Couldn't, exit with error
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
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
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
127 decb
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
128 bne L088A
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
129 lda 1,s Get MSB of ptr to start of newly allocated Sys RAM
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
130 std R$U,u Save for caller
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
131 clrb No error
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
132 L0894 puls u,pc Eat stack (U is changed after it exits) & return
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
133
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
134
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
135 **************************************************
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
136 * System Call: F$SRtMem
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
137 *
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
138 * Function: Return memory
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
139 *
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
140 * Input: U = Address of memory to return
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
141 * D = Number of bytes to return
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
142 *
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
143 * Output: None
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
144 *
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
145 * Error: CC = C bit set; B = error code
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
146 *
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
147 FSRtMem ldd R$D,u get # pages to free up
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
148 beq L08F2 nothing to free, return without error
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
149 addd #$00FF round it up to nearest page
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
150 ldb R$U+1,u get LSB of address
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
151 beq L08A6 it's a even page, skip ahead
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
152 comb set carry
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
153 ldb #E$BPAddr get error code
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
154 rts return
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
155
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
156 L08A6 ldb R$U,u get MSB of page address
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
157 beq L08F2 not a legal page, return without error
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
158 ldx <D.SysMem get pointer to system memory map
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
159 abx set pointer into map
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
160 L08AD equ *
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
161 IFNE H6309
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
162 aim #^RAMinUse,,x+
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
163 ELSE
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
164 ldb ,x
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
165 andb #^RAMinUse
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
166 stb ,x+
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
167 ENDC
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
168 deca
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
169 bne L08AD
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
170 * Scan DAT image to find memory blocks to free up
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
171 ldx <D.SysDAT get pointer to system DAT image
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
172 IFNE H6309
1239
90bad6d8388c Major changes to bring kernel closer to L2 port
boisy
parents: 1236
diff changeset
173 lde #DAT.BlCt get # blocks to check
1145
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
174 ELSE
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
175 ldy #DAT.BlCt
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
176 ENDC
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
177 L08BC ldd ,x get block image
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
178 cmpd #DAT.Free is it already free?
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
179 beq L08EC yes, skip to next one
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
180 ldu <D.BlkMap get pointer to MMU block map
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
181 lda d,u get allocation flag for this block: 16-bit offset
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
182 cmpa #RAMinUse being used?
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
183 bne L08EC no, move to next block
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
184 tfr x,d
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
185 subd <D.SysDAT
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
186 lslb
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
187 lslb
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
188 lslb
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
189 lslb
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
190 ldu <D.SysMem get pointer to system map
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
191 IFNE H6309
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
192 addr d,u
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
193 * Check if we can remove the entire memory block from system map
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
194 ldf #16 get # pages per block/2
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
195 L08DA ldd ,u++ Either of these 2 pages allocated?
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
196 ELSE
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
197 leau d,u
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
198 ldb #32
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
199 L08DA lda ,u+ Either of these 2 pages allocated?
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
200 ENDC
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
201 bne L08EC yes, can't free block, skip to next one
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
202 IFNE H6309
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
203 decf checked all pages?
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
204 ELSE
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
205 decb
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
206 ENDC
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
207 bne L08DA no, keep looking
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
208 ldd ,x get block # into B: could be >$80
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
209 ldu <D.BlkMap point to allocation table
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
210 IFNE H6309
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
211 sta d,u clear the block using 16-bit offset
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
212 ELSE
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
213 clr d,u
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
214 ENDC
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
215 ldd #DAT.Free get free block marker
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
216 std ,x save it into DAT image
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
217 L08EC leax 2,x move to next DAT block
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
218 IFNE H6309
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
219 dece done?
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
220 ELSE
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
221 leay -1,y
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
222 ENDC
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
223 bne L08BC no, keep checking
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
224 L08F2 clrb clear errors
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
225 L08F3 rts return
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
226
1345
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
227
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
228 **************************************************
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
229 * System Call: F$Boot
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
230 *
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
231 * Function: Bootstrap the system
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
232 *
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
233 * Optimized for size, as it's only called once...
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
234 *
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
235 * Input: None
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
236 *
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
237 * Output: None
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
238 *
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
239 * Error: CC = C bit set; B = error code
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
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
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
243 jsr <D.BtBug
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
244 coma Set boot flag
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
245 lda <D.Boot we booted once before?
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
246 bne L08F3 Yes, return
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
247 inc <D.Boot Set boot flag
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
248 ldx <D.Init Get ptr to init module if it exists
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
249 beq L0908 it doesn't, point to boot name
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
250 ldd <BootStr,x Get offset to text
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
251 beq L0908 Doesn't exist, get hard coded text
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
252 leax d,x Adjust X to point to boot module
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
253 bra L090C Try & link to module
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
254
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
255 boot fcs /Boot/
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
256
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
257 L0908 leax <boot,pcr
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
258 * Link to module and execute
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
259 L090C lda #Systm+Objct
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
260 os9 F$Link
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
261 bcs L08F3
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
262 lda #'b calling boot
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
263 jsr <D.BtBug
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
264 jsr ,y load boot file
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
265 bcs L08F3
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
266 std <D.BtSz save boot file size
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
267 stx <D.BtPtr save start pointer of bootfile
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
268 lda #'b boot returns OK
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
269 jsr <D.BtBug
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
270
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
271 * added for IOMan system memory extentions
1236
8508d75c91e0 Ported OS9P1 and OS9P2 to OS-9 Level Two
boisy
parents: 1145
diff changeset
272 IFNE H6309
1145
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
273 ldd M$Name,x grab the name offset
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
274 ldd d,x find the first 2 bytes of the first module
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
275 cmpd #$4E69 'Ni' ? (NitrOS9 module?)
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
276 bne not.ext no, not system memory extensions
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
277 ldd M$Exec,x grab the execution ptr
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
278 jmp d,x and go execute the system memory extension module
1236
8508d75c91e0 Ported OS9P1 and OS9P2 to OS-9 Level Two
boisy
parents: 1145
diff changeset
279 ENDC
1145
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
280
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
281 not.ext ldd <D.BtSz
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
282 bsr I.VBlock internal verify block routine
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
283 ldx <D.SysDAT get system DAT pointer
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
284 ldb $0D,x get highest allocated block number
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
285 incb allocate block 0, too
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
286 ldx <D.BlkMap point to the memory block map
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
287 lbra L01DF and go mark the blocks as used.
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
288
1345
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
289
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
290 **************************************************
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
291 * System Call: F$VBlock
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
292 *
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
293 * Function: ???
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
294 *
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
295 * Input: D = Size of block to verify
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
296 * X = Start address to verify
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
297 *
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
298 * Output: None
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
299 *
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
300 * Error: CC = C bit set; B = error code
1da8ab9ba433 Added consistent comments to each system call
boisy
parents: 1247
diff changeset
301 *
1145
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
302 FVBlock ldd R$D,u size of block to verify
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
303 ldx R$X,u start address to verify
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
304
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
305 I.VBlock leau d,x point to end of bootfile
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
306 tfr x,d
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
307 anda #$E0
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
308 clrb
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
309 pshs d,u
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
310 lsra
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
311 lsra
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
312 lsra
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
313 lsra
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
314 ldy <D.SysDAT get pointer to system DAT
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
315 leay a,y offset to bootfile
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
316 L092D ldd M$ID,x get module ID
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
317 cmpd #M$ID12 legal ID?
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
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
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
320 ldd M$Name,x find name offset pointer
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
321 pshs x
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
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
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
329
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
330 IFNE H6309
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
331 ldd ,s offset into block
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
332 subr d,x make X=offset into block
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
333 ELSE
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
334 tfr x,d
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
335 subd ,s
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
336 tfr d,x
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
337 ENDC
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
338 tfr y,d
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
339 os9 F$VModul
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
340 IFNE H6309
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
341 ldw ,s
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
342 leax w,x
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
343 ELSE
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
344 pshs b
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
345 ldd 1,s
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
346 leax d,x
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
347 puls b
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
348 ENDC
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
349 bcc L094E
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
350 cmpb #E$KwnMod
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
351 bne L0954
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
352 L094E ldd M$Size,x
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
353 leax d,x
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
354 fcb $8C skip 2 bytes
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
355
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
356 L0954 leax 1,x move to next byte
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
357 L0956 cmpx 2,s gone thru whole bootfile?
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
358 bcs L092D no, keep looking
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
359 leas 4,s purge stack
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
360 clrb
ca83286ded5b Start of new OS-9 L2 Kernel
boisy
parents:
diff changeset
361 rts