Mercurial > hg > Members > kono > nitros9-code
annotate level1/cmds/cobbler.asm @ 2193:97391b69843d
Modified size of dw3 format tracks
author | boisy |
---|---|
date | Wed, 11 Mar 2009 11:08:44 +0000 |
parents | d141618d38df |
children | 2e7092ed1e10 |
rev | line source |
---|---|
0 | 1 ******************************************************************** |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
2 * Cobbler - Write OS9Boot to a disk |
0 | 3 * |
4 * $Id$ | |
5 * | |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1304
diff
changeset
|
6 * Edt/Rev YYYY/MM/DD Modified by |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1304
diff
changeset
|
7 * Comment |
0 | 8 * ------------------------------------------------------------------ |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1304
diff
changeset
|
9 * 7 ????/??/?? |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1304
diff
changeset
|
10 * From Tandy OS-9 Level Two VR 02.00.01. |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1304
diff
changeset
|
11 * |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1304
diff
changeset
|
12 * 2002/07/20 Boisy G. Pitre |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1304
diff
changeset
|
13 * Modified source to allow for OS-9 Level One and Level Two assembly. |
1902 | 14 * |
15 * 2005/11/03 P.Harvey-Smith. | |
16 * Added the ability to assemble for either CoCo or Dragon. | |
17 * | |
0 | 18 |
19 nam Cobbler | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
20 ttl Write OS9Boot to a disk |
0 | 21 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
22 * Disassembled 02/07/06 13:08:41 by Disasm v1.6 (C) 1988 by RML |
0 | 23 |
924 | 24 IFP1 |
126 | 25 use defsfile |
924 | 26 ENDC |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
172
diff
changeset
|
27 |
921
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
264
diff
changeset
|
28 DOHELP set 0 |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
264
diff
changeset
|
29 |
0 | 30 tylg set Prgrm+Objct |
31 atrv set ReEnt+rev | |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1304
diff
changeset
|
32 rev set $00 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
33 edition set 7 |
260
1db453e3ce5f
Added patch from Jan 1987 Rainbow, pg 203 to fix bitmap allocation bug
boisy
parents:
213
diff
changeset
|
34 |
0 | 35 mod eom,name,tylg,atrv,start,size |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
172
diff
changeset
|
36 |
1902 | 37 org 0 |
38 lsn0buff rmb 26 Buffer to hold data from LSN0 of traget device | |
39 newbpath rmb 1 | |
40 devpath rmb 3 | |
41 EndDevName rmb 2 pointer to last character of device name when moving to fullbnam | |
42 fullbnam rmb 20 this buffer hodls the entire name (i.e. /D0/OS9Boot) | |
43 u0034 rmb 16 | |
44 BootBuf rmb 7 Area to read part of current boot area into, to check for boot stuff | |
45 u004B rmb 2 | |
46 LSNBitmapByte rmb 1 Saved byte from bitmap, of current LSN | |
47 u004E rmb 16 | |
48 pathopts rmb 20 | |
49 u0072 rmb 2 | |
50 u0074 rmb 10 | |
51 bffdbuf rmb 16 | |
52 u008E rmb 1 | |
53 u008F rmb 7 | |
54 u0096 rmb 232 | |
55 bitmbuf rmb 1024 | |
56 | |
57 IFGT Level-1 | |
58 u057E rmb 76 | |
59 u05CA rmb 8316 | |
60 ENDC | |
61 size equ . | |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
172
diff
changeset
|
62 |
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
172
diff
changeset
|
63 name fcs /Cobbler/ |
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
172
diff
changeset
|
64 fcb edition |
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
172
diff
changeset
|
65 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
66 L0015 fcb $00 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
67 fcb $00 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
68 |
921
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
264
diff
changeset
|
69 IFNE DOHELP |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
264
diff
changeset
|
70 HelpMsg fcb C$LF |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
168
diff
changeset
|
71 fcc "Use: COBBLER </devname>" |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
168
diff
changeset
|
72 fcb C$LF |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
168
diff
changeset
|
73 fcc " to create a new system disk" |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
168
diff
changeset
|
74 fcb C$CR |
921
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
264
diff
changeset
|
75 ENDC |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
264
diff
changeset
|
76 WritErr fcb C$LF |
126 | 77 fcc "Error writing kernel track" |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
168
diff
changeset
|
78 fcb C$CR |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
79 fcb C$LF |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
168
diff
changeset
|
80 fcc "Error - cannot gen to hard disk" |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
168
diff
changeset
|
81 fcb C$CR |
1902 | 82 |
83 IFNE DRAGON | |
84 FileWarn fcb C$LF | |
85 fcc "Warning - not a Dragon " | |
86 fcb C$LF | |
87 fcc "disk." | |
88 | |
89 ELSE | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
90 FileWarn fcb C$LF |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
168
diff
changeset
|
91 fcc "Warning - file(s) present" |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
168
diff
changeset
|
92 fcb C$LF |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
168
diff
changeset
|
93 fcc "on track 34 - this track" |
1902 | 94 |
95 ENDC | |
96 | |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
168
diff
changeset
|
97 fcb C$LF |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
168
diff
changeset
|
98 fcc "not rewritten." |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
168
diff
changeset
|
99 fcb C$CR |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
100 BootFrag fcb C$LF |
126 | 101 fcc "Error - OS9boot file fragmented" |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
168
diff
changeset
|
102 fcb C$CR |
924 | 103 IFGT Level-1 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
104 RelMsg fcb C$LF |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
105 fcc "Error - can't link to Rel module" |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
106 fcb C$CR |
924 | 107 ENDC |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
108 BootName fcc "OS9Boot " |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
109 fcb $FF |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
110 RelNam fcc "Rel" |
0 | 111 fcb $FF |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
168
diff
changeset
|
112 |
1902 | 113 DragonRootSec equ $12 Dragon root sector is always LSN 18 |
114 | |
115 start clrb Check first char is a / | |
260
1db453e3ce5f
Added patch from Jan 1987 Rainbow, pg 203 to fix bitmap allocation bug
boisy
parents:
213
diff
changeset
|
116 lda #PDELIM |
0 | 117 cmpa ,x |
921
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
264
diff
changeset
|
118 lbne ShowHelp |
1902 | 119 |
120 os9 F$PrsNam Parse the name | |
121 lbcs ShowHelp Error : show help | |
122 | |
123 lda #PDELIM Check that path has only one / e.g. '/d1' | |
0 | 124 cmpa ,y |
1902 | 125 lbeq ShowHelp yes : show help |
126 | |
127 leay <fullbnam,u Transfer name to our buffer | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
128 L013C sta ,y+ |
0 | 129 lda ,x+ |
130 decb | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
131 bpl L013C |
1902 | 132 |
133 sty <EndDevName Save pointer to end of dev name | |
134 ldd #PENTIR*256+C$SPAC Store '@ ' at end of devname, for entire dev e.g. '/d1@ ' | |
0 | 135 std ,y++ |
1902 | 136 leax <fullbnam,u Point to devname |
137 lda #UPDAT. Open for update | |
138 os9 I$Open | |
139 sta <devpath Save pathnumber | |
140 lbcs ShowHelp Error opening dev, show help + exit | |
141 | |
142 ldx <EndDevName Get pointer to end of dev name | |
143 leay >BootName,pcr Get pointer to boot file name | |
144 lda #PDELIM Append path delimiter e.g. '/d1/' | |
145 L0162 sta ,x+ Append boot name to dev name e.g. '/d1/OS9Boot' | |
0 | 146 lda ,y+ |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
147 bpl L0162 |
1902 | 148 |
0 | 149 pshs u |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
150 clra |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
151 clrb |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
152 tfr d,x |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
153 tfr d,u |
924 | 154 lda <devpath |
1902 | 155 os9 I$Seek seek to 0 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
156 lbcs Bye |
0 | 157 puls u |
1902 | 158 leax lsn0buff,u Point to buffer |
159 ldy #DD.DAT $1A | |
924 | 160 lda <devpath |
1902 | 161 os9 I$Read read LSN0 |
162 lbcs Bye Error : exit | |
163 | |
164 ldd <DD.BSZ get size of bootfile currently | |
165 beq L019F branch if none | |
166 | |
924 | 167 leax <fullbnam,u |
1902 | 168 os9 I$Delete delete existing bootfile |
169 | |
170 clra | |
0 | 171 clrb |
1902 | 172 sta <DD.BT Init some of the LSN0 vars |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
173 std <DD.BT+1 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
174 std <DD.BSZ |
1902 | 175 lbsr WriteLSN0 Write back to disk |
176 | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
177 L019F lda #WRITE. |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
178 ldb #READ.+WRITE. |
924 | 179 leax <fullbnam,u |
1902 | 180 os9 I$Create create new bootfile |
181 sta <newbpath Save pathnumber | |
182 lbcs Bye branch if error | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
183 |
924 | 184 IFGT Level-1 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
185 * OS-9 Level Two: Copy first 90 bytes of system direct page into our space |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
186 * so we can figure out boot location and size, then copy to our space |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
187 leax >L0015,pcr |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
188 tfr x,d |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
189 ldx #$0000 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
190 ldy #$0090 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
191 pshs u |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
192 leau >u057E,u |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
193 os9 F$CpyMem |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
194 lbcs Bye |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
195 puls u |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
196 leax >L0015,pcr |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
197 tfr x,d |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
198 ldx >u05CA,u |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
199 ldy #$0010 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
200 pshs u |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
201 leau <u004E,u |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
202 os9 F$CpyMem |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
203 puls u |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
204 lbcs Bye |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
205 leax >u057E,u |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
206 ldd <D.BtPtr,x |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
207 pshs b,a |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
208 ldd <D.BtSz,x |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
209 std <DD.BSZ |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
210 pshs b,a |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
211 L01F7 ldy #$2000 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
212 cmpy ,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
213 bls L0203 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
214 ldy ,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
215 L0203 pshs y |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
216 leax <u004E,u |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
217 tfr x,d |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
218 ldx $04,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
219 pshs u |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
220 leau >u057E,u |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
221 os9 F$CpyMem |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
222 lbcs Bye |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
223 puls u |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
224 ldy ,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
225 leax >u057E,u |
924 | 226 lda <newbpath |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
227 os9 I$Write |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
228 lbcs Bye |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
229 puls b,a |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
230 ldy $02,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
231 leay d,y |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
232 sty $02,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
233 nega |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
234 negb |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
235 sbca #$00 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
236 ldy ,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
237 leay d,y |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
238 sty ,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
239 bne L01F7 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
240 leas $04,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
241 |
924 | 242 ELSE |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
243 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
244 * OS-9 Level One: Write out bootfile |
1902 | 245 ldd >D.BTHI get bootfile size |
260
1db453e3ce5f
Added patch from Jan 1987 Rainbow, pg 203 to fix bitmap allocation bug
boisy
parents:
213
diff
changeset
|
246 subd >D.BTLO |
1902 | 247 tfr d,y in D, tfr to Y |
248 std <DD.BSZ save it | |
249 ldx >D.BTLO get pointer to boot in mem | |
924 | 250 lda <newbpath |
1902 | 251 os9 I$Write write out boot to file |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
252 lbcs Bye |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
253 |
924 | 254 ENDC |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
255 |
1902 | 256 leax <pathopts,u Point to option buffer |
257 clrb Read option section of Path descriptor | |
1303 | 258 * ldb #SS.Opt |
1902 | 259 lda <newbpath Get pathnumber of new bootfile |
260 os9 I$GetStt Get options | |
261 lbcs Bye Error: exit | |
262 | |
263 lda <newbpath Close bootfile | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
264 os9 I$Close |
1902 | 265 |
266 lbcs ShowHelp | |
0 | 267 pshs u |
924 | 268 ldx <pathopts+(PD.FD-PD.OPT),u |
269 lda <pathopts+(PD.FD+2-PD.OPT),u | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
270 * Now X and A hold file descriptor sector LSN of newly created OS9Boot |
0 | 271 clrb |
272 tfr d,u | |
924 | 273 lda <devpath |
1902 | 274 os9 I$Seek seek to os9boot file descriptor |
0 | 275 puls u |
1902 | 276 lbcs Bye Error: exit |
277 | |
278 leax <bffdbuf,u Point to buffer for filedes sector | |
260
1db453e3ce5f
Added patch from Jan 1987 Rainbow, pg 203 to fix bitmap allocation bug
boisy
parents:
213
diff
changeset
|
279 ldy #256 |
1902 | 280 os9 I$Read read in filedes sector |
281 lbcs Bye Error: exit | |
282 ldd >bffdbuf+(FD.SEG+FDSL.S+FDSL.B),u Test if fragmented | |
283 lbne IsFragd branch if fragmented | |
284 | |
285 * Get and save bootfile's LSN | |
924 | 286 ldb >bffdbuf+(FD.SEG),u |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
287 stb <DD.BT |
924 | 288 ldd >bffdbuf+(FD.SEG+1),u |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
289 std <DD.BT+1 |
1902 | 290 lbsr WriteLSN0 Write bootfile loc to LSN0 on disk |
291 | |
1303 | 292 ldd #$0001 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
293 lbsr Seek2LSN |
1902 | 294 leax >bitmbuf,u Point to bitmap buffer |
295 ldy <DD.MAP Get block number of map | |
296 lda <devpath Get dev pathnumber | |
297 os9 I$Read read bitmap sector(s) | |
298 lbcs Bye Error: exit | |
299 | |
300 * | |
301 * On the dragon, we do not need to test to see if the boot track has files on | |
302 * as the boot area is on track 0 imediatly after the blockmap, and before | |
303 * the root directory, and therefore can never have files on it. | |
304 * However, we do need to verify that this is a Dragon formatted disk, | |
305 * we do this by checking that the root directory starts at LSN 18 (or greater). | |
306 * | |
307 ifne DRAGON | |
308 ldd <DD.DIR+1 Get LSN of root dir | |
309 cmpd #DragonRootSec Is this a dragon disk ? | |
310 beq RewriteBitmap Yes : write boot | |
311 lbra TrkAlloc No : error and exit. | |
312 else | |
313 | |
314 ldd #(Bt.Track*256)+Bt.Sec Get offset of boot track | |
315 ldy #$0004 Check 4 csectors | |
316 lbsr CheckAlloc | |
317 bcc L0304 Not allocated, check rest | |
318 | |
319 ldd #(Bt.Track*256)+Bt.Sec Get offset of boot track | |
320 lbsr Seek2LSN | |
321 leax <BootBuf,u Point to buffer | |
322 ldy #$0007 No of bytes to read | |
323 lda <devpath Get device path | |
324 os9 I$Read Do read | |
325 lbcs Bye Error : exit | |
326 | |
327 leax <BootBuf,u Point to buffer | |
328 ldd ,x Load first 2 bytes into D | |
329 cmpa #'O Check for presense of 'OS' | |
330 lbne TrkAlloc No: Try and allocate track (CoCo) | |
331 cmpb #'S | |
332 lbne TrkAlloc No: Try and allocate track (CoCo) | |
333 | |
334 lda $04,x Check 5th byte is a NOP | |
335 cmpa #$12 | |
336 beq L02F7 Yes: boot track already contains boot code | |
337 | |
338 ldd #(Bt.Track*256)+Bt.Sec+$0F | |
339 ldy #$0003 | |
340 lbsr CheckAlloc | |
341 lbcs TrkAlloc | |
342 | |
343 L02F7 clra Allocate boot track (CoCo) | |
344 ldb <DD.TKS | |
345 tfr d,y | |
346 ldd #(Bt.Track*256)+Bt.Sec | |
347 lbsr Allocate | |
348 bra RewriteBitmap | |
349 | |
350 L0304 ldd #(Bt.Track*256)+Bt.Sec+$04 Check to see if sectors 5..18 of boot track free | |
351 ldy #$000E Number of sectors | |
352 lbsr CheckAlloc Check them | |
353 lbcs TrkAlloc Carry set, sectors allocated, error & exit | |
354 bra L02F7 | |
355 | |
356 ENDC | |
357 | |
358 RewriteBitmap | |
359 ldd #$0001 | |
360 lbsr Seek2LSN Seek to bitmap sector on disk | |
924 | 361 leax >bitmbuf,u |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
362 ldy <DD.MAP |
924 | 363 lda <devpath |
1902 | 364 os9 I$Write write updated bitmap |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
365 lbcs Bye |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
366 |
924 | 367 IFGT Level-1 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
368 * OS-9 Level Two: Link to Rel, which brings in boot code |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
369 pshs u |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
370 lda #Systm+Objct |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
371 leax >RelNam,pcr |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
372 os9 F$Link |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
373 lbcs NoRel |
1902 | 374 tfr u,d tfr module header to D |
375 puls u get statics ptr | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
376 subd #$0006 |
1902 | 377 std <u004B,u save pointer |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
378 lda #$E0 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
379 anda <u004B,u |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
380 ora #$1E |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
381 ldb #$FF |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
382 subd <u004B,u |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
383 addd #$0001 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
384 tfr d,y |
1902 | 385 ldd #(Bt.Track*256)+Bt.Sec |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
386 lbsr Seek2LSN |
924 | 387 lda <devpath |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
388 ldx <u004B,u |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
389 |
924 | 390 ELSE |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
391 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
392 * OS-9 Level One: Write out data at $EF00 |
1902 | 393 ldd #(Bt.Track*256)+Bt.Sec Seek to boot track |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
394 lbsr Seek2LSN |
1902 | 395 lda <devpath |
396 ldx #Bt.Start Get boot start and size | |
1300 | 397 ldy #Bt.Size |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
398 |
924 | 399 ENDC |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
400 |
1902 | 401 os9 I$Write Write boot track |
402 lbcs WriteBad Error | |
403 os9 I$Close Close devpath | |
404 lbcs Bye Error : exit | |
405 clrb Flag no error | |
406 lbra Bye | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
407 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
408 * Get absolute LSN |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
409 * Returns in D |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
410 AbsLSN pshs b |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
411 ldb <DD.FMT get format byte |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
412 andb #$01 check how many sides? |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
413 beq L037F branch if 1 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
414 ldb #$02 else assume 2 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
415 bra L0381 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
416 L037F ldb #$01 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
417 L0381 mul |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
418 lda <DD.TKS |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
419 mul |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
420 addb ,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
421 adca #$00 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
422 leas $01,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
423 rts |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
424 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
425 * Returns bit in bitmap corresponding to LSN in A |
1902 | 426 * X=bitmap buffer, on exit X points to bitmap byte of our LSN |
427 GetBitmapBit | |
428 pshs y,b | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
429 * Divide D by 8 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
430 lsra |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
431 rorb |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
432 lsra |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
433 rorb |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
434 lsra |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
435 rorb |
1902 | 436 leax d,x Point X at byte witin bitmap of our LSN ? |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
437 puls b |
1902 | 438 leay <BitTable,pcr Point to bit table |
439 andb #$07 Make sure offset within table | |
440 lda b,y Get bit from table | |
441 puls pc,y Restore and return | |
442 | |
443 BitTable fcb $80,$40,$20,$10,$08,$04,$02,$01 Bitmap bit table | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
444 |
1902 | 445 * |
446 * CheckAlloc, check to see if a block of sectors is allocated. | |
447 * | |
448 * Entry : A=track, B= sector, Y=number of sectors | |
449 * Exit : Carry Set, sectors are already allocated. Carry clear, sectors are free. | |
450 * | |
451 CheckAlloc | |
452 pshs y,x,b,a | |
453 bsr AbsLSN go get absolute LSN in D | |
924 | 454 leax >bitmbuf,u point X to our bitmap buffer |
1902 | 455 bsr GetBitmapBit |
456 | |
457 sta ,-s save off | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
458 bmi L03CB |
1902 | 459 |
460 lda ,x Get bitmap byte of our LSN | |
461 sta <LSNBitmapByte Save for later use | |
462 L03BB anda ,s Is our LSN allocated ? | |
463 bne L03F7 Yes : flag error | |
464 | |
465 leay -$01,y Decrement sector count | |
466 beq L03F3 All done : yes, exit | |
467 | |
468 lda <LSNBitmapByte Get saved bitmap byte | |
469 lsr ,s Check next sector | |
470 bcc L03BB If carry, we need to fetch next byte from bitmap | |
471 | |
472 leax $01,x Increment bitmap pointer | |
473 L03CB lda #$FF | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
474 sta ,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
475 bra L03DB |
1902 | 476 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
477 L03D1 lda ,x |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
478 anda ,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
479 bne L03F7 |
1902 | 480 |
481 leax $01,x | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
482 leay -$08,y |
1902 | 483 L03DB cmpy #$0008 Done a whole byte's worth of blocks ? |
484 bhi L03D1 Yes | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
485 beq L03ED |
1902 | 486 |
487 lda ,s Fetch current bit | |
488 L03E5 lsra Process next sector | |
489 leay -$01,y decrement sector count | |
490 bne L03E5 Any more : yes continue | |
491 | |
492 coma | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
493 sta ,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
494 L03ED lda ,x |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
495 anda ,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
496 bne L03F7 |
1902 | 497 |
498 L03F3 andcc #^Carry | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
499 bra L03F9 |
1902 | 500 |
501 L03F7 orcc #Carry Flag error ? | |
502 L03F9 leas $01,s Drop saved byte | |
503 puls pc,y,x,b,a Restore and return | |
504 | |
505 | |
506 * | |
507 * Allocate, allocate blocks in bitmap | |
508 * Entry : A=track, B=sector, Y=block count. | |
509 * | |
510 | |
511 Allocate | |
512 pshs y,x,b,a | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
513 lbsr AbsLSN get absolute LSN |
1902 | 514 leax >bitmbuf,u Point to bitmap buffer |
515 bsr GetBitmapBit Get bit corisponding to LSN | |
516 | |
517 sta ,-s Save it | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
518 bmi L041C |
1902 | 519 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
520 lda ,x |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
521 L040E ora ,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
522 leay -$01,y |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
523 beq L043A |
1902 | 524 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
525 lsr ,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
526 bcc L040E |
1902 | 527 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
528 sta ,x |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
529 leax $01,x |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
530 L041C lda #$FF |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
531 bra L0426 |
1902 | 532 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
533 L0420 sta ,x |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
534 leax $01,x |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
535 leay -$08,y |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
536 L0426 cmpy #$0008 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
537 bhi L0420 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
538 beq L043A |
1902 | 539 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
540 L042E lsra |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
541 leay -$01,y |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
542 bne L042E |
1902 | 543 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
544 coma |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
545 sta ,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
546 lda ,x |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
547 ora ,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
548 L043A sta ,x |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
549 leas $01,s |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
550 puls pc,y,x,b,a |
168
3a847d2b4492
Cobbler, OS9Gen and format are all hardware dependent.
roug
parents:
126
diff
changeset
|
551 |
1902 | 552 * |
553 * Seek To LSN, A=track, B=sector | |
554 * | |
555 | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
556 Seek2LSN pshs u,y,x,b,a |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
557 lbsr AbsLSN |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
558 pshs a |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
559 tfr b,a |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
560 clrb |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
561 tfr d,u |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
562 puls b |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
563 clra |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
564 tfr d,x |
924 | 565 lda <devpath |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
566 os9 I$Seek |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
567 bcs WriteBad |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
568 puls pc,u,y,x,b,a |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
569 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
570 WriteLSN0 |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
571 pshs u added for OS-9 Level One +BGP+ |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
572 clra |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
573 clrb |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
574 tfr d,x |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
575 tfr d,u |
924 | 576 lda <devpath |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
577 os9 I$Seek Seek to LSN0 |
1902 | 578 |
579 puls u added for OS-9 Level One +BGP+ | |
924 | 580 leax lsn0buff,u Point to our LSN buffer |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
581 ldy #DD.DAT |
924 | 582 lda <devpath |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
583 os9 I$Write Write to disk |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
584 bcs Bye branch if error |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
585 rts |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
586 |
921
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
264
diff
changeset
|
587 ShowHelp equ * |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
264
diff
changeset
|
588 IFNE DOHELP |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
264
diff
changeset
|
589 leax >HelpMsg,pcr |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
264
diff
changeset
|
590 ELSE |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
264
diff
changeset
|
591 clrb |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
264
diff
changeset
|
592 bra Bye |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
264
diff
changeset
|
593 ENDC |
1902 | 594 |
595 DisplayErrorAndExit | |
596 pshs b | |
0 | 597 lda #$02 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
598 ldy #256 |
0 | 599 os9 I$WritLn |
600 comb | |
601 puls b | |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
602 Bye os9 F$Exit |
168
3a847d2b4492
Cobbler, OS9Gen and format are all hardware dependent.
roug
parents:
126
diff
changeset
|
603 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
604 IsFragd leax >BootFrag,pcr |
0 | 605 clrb |
1902 | 606 bra DisplayErrorAndExit |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
168
diff
changeset
|
607 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
608 WriteBad leax >WritErr,pcr |
0 | 609 clrb |
1902 | 610 bra DisplayErrorAndExit |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
168
diff
changeset
|
611 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
612 TrkAlloc leax >FileWarn,pcr |
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
613 clrb |
1902 | 614 bra DisplayErrorAndExit |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
615 |
924 | 616 IFGT Level-1 |
264
1ced4acebe44
edition 7 - from CoCo OS-9 Level Two version of cobbler with additions for
boisy
parents:
260
diff
changeset
|
617 NoRel leax >RelMsg,pcr |
1902 | 618 bra DisplayErrorAndExit |
924 | 619 ENDC |
260
1db453e3ce5f
Added patch from Jan 1987 Rainbow, pg 203 to fix bitmap allocation bug
boisy
parents:
213
diff
changeset
|
620 |
0 | 621 emod |
622 eom equ * | |
260
1db453e3ce5f
Added patch from Jan 1987 Rainbow, pg 203 to fix bitmap allocation bug
boisy
parents:
213
diff
changeset
|
623 end |