Mercurial > hg > Members > kono > nitros9-code
annotate level1/cmds/os9gen.asm @ 2231:27f07aa0bca0
Updated modules to use Darren Atkinson's latest changes to low level read/write routines
author | boisy |
---|---|
date | Sun, 12 Apr 2009 18:48:24 +0000 |
parents | aa3228536418 |
children | 538be58c2c2d |
rev | line source |
---|---|
0 | 1 ******************************************************************** |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
2 * OS9Gen - OS-9 bootfile generator |
0 | 3 * |
4 * $Id$ | |
5 * | |
1916 | 6 * -e = extended boot (fragmented) |
7 * -q=<path> = quick gen .. set sector zero pointing to <path> | |
8 * -r = remove pointer to boot file (does not delete file) | |
9 * -s = single drive option | |
10 * -t=<boottrack> = boot track file to use | |
11 * | |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1303
diff
changeset
|
12 * Edt/Rev YYYY/MM/DD Modified by |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1303
diff
changeset
|
13 * Comment |
0 | 14 * ------------------------------------------------------------------ |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1303
diff
changeset
|
15 * 9 ????/??/?? |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1303
diff
changeset
|
16 * From OS-9 Level Two Vr. 2.00.01. |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1303
diff
changeset
|
17 * |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1303
diff
changeset
|
18 * 10 2003/06/28 Boisy G. Pitre |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1303
diff
changeset
|
19 * Added -t= option, fixed bug in single disk swap routine if key |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1303
diff
changeset
|
20 * besides 'C' was pressed, minor optimizations. |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1303
diff
changeset
|
21 * |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1303
diff
changeset
|
22 * l0r2 2003/07/24 Boisy G. Pitre |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1303
diff
changeset
|
23 * Fixed bug introduced in V03.01.03 where os9gen wouldn't write boot |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1303
diff
changeset
|
24 * track on DS disks. |
1916 | 25 * |
26 * 11 2005/10/10 Boisy G. Pitre | |
27 * Added -e option to create fragmented bootfiles. | |
2147 | 28 * |
29 * 12 2006/05/09 Christopher R. Hawks | |
2066
208c8e8dd175
Initialized eflag. Without it, all bootfiles were extended.
chrish
parents:
1916
diff
changeset
|
30 * Weren't clearing -e option, so all os9boot files were extended. |
208c8e8dd175
Initialized eflag. Without it, all bootfiles were extended.
chrish
parents:
1916
diff
changeset
|
31 |
1166 | 32 nam OS9Gen |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
33 ttl OS-9 bootfile generator |
0 | 34 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
35 * Disassembled 02/07/06 13:11:11 by Disasm v1.6 (C) 1988 by RML |
0 | 36 |
912 | 37 IFP1 |
122 | 38 use defsfile |
912 | 39 ENDC |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
172
diff
changeset
|
40 |
921
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
41 DOHELP set 0 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
42 DOHD set 1 allow bootfile creation on HD |
921
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
43 |
0 | 44 tylg set Prgrm+Objct |
45 atrv set ReEnt+rev | |
1916 | 46 rev set $00 |
2066
208c8e8dd175
Initialized eflag. Without it, all bootfiles were extended.
chrish
parents:
1916
diff
changeset
|
47 edition set 12 |
262
dd9e2f44b5f0
Incorporated bug fix from January 1987 Rainbow, pg 203
boisy
parents:
213
diff
changeset
|
48 |
0 | 49 mod eom,name,tylg,atrv,start,size |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
172
diff
changeset
|
50 |
912 | 51 org 0 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
52 btfname rmb 2 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
53 btflag rmb 1 |
1916 | 54 qfname rmb 2 |
55 qflag rmb 1 | |
56 rflag rmb 1 | |
912 | 57 statptr rmb 2 |
58 bfpath rmb 1 | |
59 devpath rmb 1 | |
60 parmpath rmb 1 | |
1916 | 61 u0005 rmb 1 Needed? |
0 | 62 u0006 rmb 2 |
1916 | 63 ddbt rmb 3 |
64 ddbtsz rmb 2 | |
0 | 65 u000D rmb 2 |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
66 u000F rmb 2 |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
67 u0011 rmb 2 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
68 u0013 rmb 2 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
69 u0015 rmb 2 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
70 u0017 rmb 7 |
912 | 71 devopts rmb 20 |
1916 | 72 bfdlsn rmb 3 |
73 u0035 rmb 9 | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
74 u003E rmb 2 |
1916 | 75 eflag rmb 1 |
912 | 76 sngldrv rmb 1 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
77 bootdev rmb 32 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
78 lsn0 rmb 26 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
79 u007B rmb 2 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
80 u007D rmb 1 |
912 | 81 sectbuff rmb 1024 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
82 u047E rmb 16 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
83 u048E rmb 1 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
84 u048F rmb 7 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
85 u0496 rmb 7018 |
0 | 86 size equ . |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
172
diff
changeset
|
87 |
1217 | 88 name fcs /OS9Gen/ |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
172
diff
changeset
|
89 fcb edition |
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
172
diff
changeset
|
90 |
921
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
91 IFNE DOHELP |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
92 HelpMsg fcb C$LF |
1883 | 93 fcc "Use (CAUTION): OS9Gen </devname> <opts>" |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
94 fcb C$LF |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
95 fcc " ..reads (std input) pathnames until EOF," |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
96 fcb C$LF |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
97 fcc " merging paths into New OS9Boot file." |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
98 fcb C$LF |
1916 | 99 fcc " -e = extended boot (fragmented)" |
100 fcb C$LF | |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
101 fcc " -s = single drive operation" |
1215 | 102 fcb C$LF |
1217 | 103 fcc " -t=boottrack = set boot track file" |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
104 fcb C$LF,C$CR |
921
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
105 ENDC |
122 | 106 fcc "Can't find: " |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
107 ErrWrit fcb C$LF |
122 | 108 fcc "Error writing kernel track" |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
109 fcb C$CR |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
110 IFEQ DOHD |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
111 HDGen fcb C$LF |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
112 fcc "Error - cannot gen to hard disk" |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
113 fcb C$CR |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
114 ENDC |
912 | 115 IFGT Level-1 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
116 CantRel fcb C$LF |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
117 fcc "Error - can't link to Rel module" |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
118 fcb C$CR |
912 | 119 ENDC |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
120 CarRet fcb C$CR |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
121 TheBell fcb C$BELL |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
122 TWarn fcb C$LF |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
123 fcc "Warning - file(s) present" |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
124 fcb C$LF |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
125 fcc "on track " |
1303 | 126 IFEQ Bt.Track-34 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
127 fcc "34" |
912 | 128 ELSE |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
129 fcc "??" |
912 | 130 ENDC |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
131 fcc " - this track" |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
132 fcb C$LF |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
133 fcc "not rewritten." |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
134 fcb C$CR |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
135 BootFrag fcb C$LF |
1215 | 136 fcc "Error - OS9Boot file fragmented" |
122 | 137 fcb C$CR |
1222
230f052298a5
os9gen's -t now works with Level 1 boot track files, bootlists modified
boisy
parents:
1217
diff
changeset
|
138 IFNE 0 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
139 BadTkMsg fcc "Error - Boot track file must be 4608 bytes" |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
140 fcb C$CR |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
141 BadTkMsgL equ *-BadTkMsg |
1222
230f052298a5
os9gen's -t now works with Level 1 boot track files, bootlists modified
boisy
parents:
1217
diff
changeset
|
142 ENDC |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
143 Source fcc "Ready SOURCE, hit C to continue: " |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
144 SourceL equ *-Source |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
145 Destin fcc "Ready DESTINATION, hit C to continue: " |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
146 DestinL equ *-Destin |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
147 Rename fcc "RENAME " |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
148 TempBoot fcc "TempBoot " |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
149 fcb $FF |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
150 OS9Boot fcc "OS9Boot" |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
151 fcb C$CR |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
152 fcb $FF |
912 | 153 IFGT Level-1 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
154 TheRel fcc "Rel" |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
155 fcb $FF |
912 | 156 ENDC |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
157 |
1916 | 158 * Here's how registers are set when this process is forked: |
159 * | |
160 * +-----------------+ <-- Y (highest address) | |
161 * ! Parameter ! | |
162 * ! Area ! | |
163 * +-----------------+ <-- X, SP | |
164 * ! Data Area ! | |
165 * +-----------------+ | |
166 * ! Direct Page ! | |
167 * +-----------------+ <-- U, DP (lowest address) | |
168 * | |
169 * D = parameter area size | |
170 * PC = module entry point abs. address | |
171 * CC = F=0, I=0, others undefined | |
172 | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
173 start clrb |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
174 stb <btflag assume no -t specified |
0 | 175 stb <u0005 |
912 | 176 stb <sngldrv assume multi-drive |
2066
208c8e8dd175
Initialized eflag. Without it, all bootfiles were extended.
chrish
parents:
1916
diff
changeset
|
177 stb <eflag assume not extended bootfile |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
178 stu <statptr save statics pointer |
1916 | 179 leas >u047E,u point stack pointer to u047e |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
180 pshs u |
1916 | 181 tfr y,d copy pointer to top of our mem in D |
182 subd ,s++ D = Y-u047e | |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
183 subd #u047E |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
184 clrb |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
185 std <u0011 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
186 lda #PDELIM |
1916 | 187 cmpa ,x first char of device name a path delimiter? |
188 lbne BadName branch if not (bad name) | |
189 os9 F$PrsNam else parse name | |
190 lbcs ShowHelp branch if error | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
191 lda #PDELIM |
0 | 192 cmpa ,y |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
193 lbeq BadName |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
194 pshs b,a |
1916 | 195 parseopt lda ,y+ get next character |
196 cmpa #'- dash? | |
197 beq parsein branch if so | |
198 cmpa #C$CR end of line? | |
199 beq getdev branch if so | |
200 bra parseopt else continue to parse options | |
201 parsein ldd ,y+ get two chars after - | |
202 cmpa #C$CR end of line? | |
203 beq getdev branch if so | |
204 cmpa #C$SPAC space? | |
205 beq parseopt yes, look for next char | |
206 anda #$DF else make value in A uppercase | |
207 cmpa #'R is it R? | |
208 beq remboot branch if so | |
209 cmpa #'S is it S? | |
210 beq onedrive branch if so | |
211 cmpa #'E is it E | |
212 beq extend branch if so | |
213 cmpd #81*256+61 does D = 'Q=' | |
214 beq quick | |
215 cmpd #84*256+61 does D = 'T=' | |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
216 lbne SoftExit |
1916 | 217 leay 1,y point past = |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
218 sty <btfname save pointer to boottrack filename |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
219 sta <btflag |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
220 * Skip over non-spaces and non-CRs |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
221 SkipNon lda ,y+ |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
222 cmpa #C$CR |
1916 | 223 beq getdev |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
224 cmpa #C$SPAC |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
225 bne SkipNon |
1916 | 226 bra parseopt |
227 remboot inc <rflag remove bootfile reference from LSN0 flag | |
228 bra parsein | |
229 onedrive inc <sngldrv set single drive flag | |
230 bra parsein | |
231 extend inc <eflag set extended boot flag | |
232 bra parsein | |
233 quick leay 1,y point past = | |
234 sty <qfname save pointer to quick filename | |
235 sta <qflag | |
236 getdev puls b,a | |
237 leay <bootdev,u point to boot device | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
238 L0239 sta ,y+ |
0 | 239 lda ,x+ |
240 decb | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
241 bpl L0239 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
242 sty <u003E |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
243 ldd #PENTIR*256+C$SPAC |
0 | 244 std ,y++ |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
245 lbsr GetDest |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
246 leax <bootdev,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
247 lda #UPDAT. |
0 | 248 os9 I$Open |
912 | 249 sta <devpath |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
250 lbcs ShowHelp |
912 | 251 leax <devopts,u |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
252 clrb |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
253 * ldb #SS.Opt |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
254 os9 I$GetStt |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
255 lbcs Bye |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
256 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
257 IFEQ DOHD |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
258 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
259 * If destination drive is hard disk, don't allow |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
260 leax devopts,u |
912 | 261 lda <(PD.TYP-PD.OPT)+devopts,u get type byte |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
262 bpl L0276 branch if not hard drive |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
263 clrb |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
264 leax >HDGen,pcr else tell user can't do hard drive |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
265 lbra WritExit |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
266 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
267 ENDC |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
268 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
269 L0276 ldx <u003E |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
270 leay >TempBoot,pcr |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
271 lda #PDELIM |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
272 L027E sta ,x+ |
0 | 273 lda ,y+ |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
274 bpl L027E |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
275 * Copy OS9Boot string to buffer |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
276 leay >OS9Boot,pcr |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
277 L0288 lda ,y+ |
0 | 278 sta ,x+ |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
279 bpl L0288 |
0 | 280 tfr x,d |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
281 leax <bootdev,u |
0 | 282 pshs x |
283 subd ,s++ | |
284 std <u000D | |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
285 ldd #WRITE.*256+(READ.+WRITE.) |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
286 * lda #WRITE. |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
287 * ldb #READ.+WRITE. |
0 | 288 os9 I$Create |
912 | 289 sta <bfpath |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
290 lbcs Bye |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
291 ldx #$0000 upper 16 bits are zero |
0 | 292 stx <u0006 |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
293 ldu #$3000 |
169 | 294 ldb #SS.Size |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
295 os9 I$SetStt set size of newly created file |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
296 lbcs Bye branch if error |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
297 ldu <statptr retrieve static pointer |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
298 bsr L032F |
1217 | 299 |
300 * Read Bootlist file, line by line | |
301 ReadBLst leax sectbuff,u | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
302 ldy #256 |
1916 | 303 clra standard input |
912 | 304 os9 I$ReadLn read line |
305 bcs L0312 branch if error | |
1916 | 306 lda ,x else get byte in A |
912 | 307 ldb #E$EOF and EOF error in B |
308 cmpa #C$CR CR? | |
309 beq L0312 branch if so | |
1916 | 310 cmpa #'* comment? |
1217 | 311 beq ReadBLst continue reading if so |
912 | 312 lda #READ. else use read perms |
313 os9 I$Open open file at X (line we read) | |
314 bcs L031A branch if error | |
315 sta <parmpath save path | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
316 L02DD ldx <u0015 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
317 ldd <u0011 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
318 subd <u0013 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
319 tfr d,y |
912 | 320 lda <parmpath |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
321 os9 I$Read |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
322 bcc L02F9 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
323 cmpb #E$EOF |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
324 lbne Bye |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
325 os9 I$Close |
912 | 326 clr <parmpath |
1217 | 327 bra ReadBLst |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
328 L02F9 tfr y,d |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
329 leax d,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
330 stx <u0015 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
331 addd <u0013 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
332 std <u0013 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
333 cmpd <u0011 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
334 bcs L030C |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
335 bsr L032B |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
336 bcs L0328 |
912 | 337 L030C tst <parmpath |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
338 bne L02DD |
1217 | 339 bra ReadBLst |
912 | 340 L0312 cmpb #E$EOF end of file? |
341 bne L0328 branch if not | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
342 bsr L033D |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
343 bra L0377 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
344 L031A pshs b |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
345 leax sectbuff,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
346 ldy #256 |
912 | 347 lda #$02 standard error |
348 os9 I$WritLn write | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
349 L0328 lbra Bye |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
350 L032B bsr L033D |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
351 bcs L033C |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
352 L032F lbsr GetSrc |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
353 clra |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
354 clrb |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
355 std <u0013 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
356 leax >u047E,u |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
357 stx <u0015 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
358 L033C rts |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
359 L033D lbsr GetDest |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
360 ldd <u0013 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
361 beq L033C |
912 | 362 tst <sngldrv single drive? |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
363 beq L0361 branch if not |
912 | 364 lda <devpath |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
365 ldx #$0000 |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
366 ldu #$0000 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
367 os9 I$Seek seek to LSN0 |
912 | 368 ldu <statptr +BGP+ added |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
369 bcs L033C |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
370 leax sectbuff,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
371 ldy #256 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
372 os9 I$Read read LSN0 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
373 bcs L033C |
1883 | 374 L0361 lda <bfpath get bootfile path in A |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
375 leax >u047E,u |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
376 ldy <u0013 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
377 os9 I$Write |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
378 bcs L033C |
0 | 379 tfr y,d |
380 addd <u0006 | |
381 std <u0006 | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
382 clrb |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
383 rts |
912 | 384 L0377 leax <devopts,u |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
385 clrb |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
386 * ldb #SS.Opt |
912 | 387 lda <bfpath |
0 | 388 os9 I$GetStt |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
389 lbcs Bye |
1883 | 390 lda <bfpath get bootfile path |
0 | 391 ldx #$0000 |
392 ldu <u0006 | |
1883 | 393 ldb #SS.Size set bootfile size |
0 | 394 os9 I$SetStt |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
395 lbcs Bye |
912 | 396 ldu <statptr |
0 | 397 os9 I$Close |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
398 lbcs ShowHelp |
1883 | 399 |
1916 | 400 tst <eflag extended boot option used? |
1883 | 401 bne nonfrag yes, don't check for fragmented file |
402 | |
1916 | 403 ldx <bfdlsn,u load X/U with LSN of bootfile fd sector |
404 lda <bfdlsn+2,u | |
1883 | 405 clrb round off to sector boundary |
0 | 406 tfr d,u |
1883 | 407 lda <devpath get path to raw device |
408 os9 I$Seek seek | |
912 | 409 ldu <statptr |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
410 lbcs Bye |
1883 | 411 leax >u047E,u point to buffer |
412 ldy #256 read one sector | |
413 os9 I$Read do it! | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
414 lbcs Bye |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
415 ldd >u047E+(FD.SEG+FDSL.S+FDSL.B),u |
1883 | 416 lbne ItsFragd if not zero, file is fragmented |
1916 | 417 nonfrag lda <devpath get the device path |
0 | 418 ldx #$0000 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
419 ldu #DD.BT |
1916 | 420 os9 I$Seek seek to DD.BT in LSN0 |
912 | 421 ldu <statptr |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
422 lbcs Bye |
1916 | 423 leax ddbt,u point to our internal ddbt copy in statics |
424 ldy #DD.DAT-DD.BT we want DD.BT and DD.BTSZ into ddbt,u | |
425 os9 I$Read so read bootstrap sector and bootfile size | |
1883 | 426 lbcs Bye branch if error |
1916 | 427 ldd <ddbtsz get DD.BTSZ in D |
1883 | 428 beq L040D branch if zero |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
429 ldx <u003E |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
430 leay >OS9Boot,pcr |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
431 lda #PDELIM |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
432 L03F3 sta ,x+ |
0 | 433 lda ,y+ |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
434 bpl L03F3 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
435 leax <bootdev,u |
1916 | 436 os9 I$Delete delete the os9boot file |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
437 ldx <u003E |
1916 | 438 leay >TempBoot,pcr point to "tempboot" name |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
439 lda #PDELIM |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
440 L0407 sta ,x+ |
0 | 441 lda ,y+ |
1916 | 442 bpl L0407 copy it into buffer |
912 | 443 L040D tst <sngldrv |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
444 beq L042E |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
445 clra |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
446 leax >Rename,pcr |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
447 os9 F$Link |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
448 bcc L0428 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
449 lbsr GetSrc |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
450 os9 F$Load |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
451 lbcs Bye |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
452 lbsr GetDest |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
453 L0428 tfr u,d |
912 | 454 ldu <statptr |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
455 std u000F,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
456 L042E lda #$01 |
0 | 457 clrb |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
458 leax >Rename,pcr |
0 | 459 ldy <u000D |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
460 leau <bootdev,u |
1916 | 461 os9 F$Fork fork rename tempboot os9gen |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
462 lbcs Bye |
0 | 463 os9 F$Wait |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
464 lbcs Bye |
0 | 465 tstb |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
466 lbne Bye |
912 | 467 tst <sngldrv |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
468 beq L045F |
912 | 469 ldu <statptr |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
470 ldd u000F,u |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
471 tfr d,u |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
472 os9 F$UnLink |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
473 lbcs Bye |
912 | 474 L045F ldu <statptr |
1916 | 475 tst <eflag extended boot? |
476 beq oldstyle branch if not | |
477 lda <bfdlsn,u get LSN of fdsect | |
478 stb <ddbt save in DD.BT | |
479 ldd <bfdlsn+1,u | |
480 std <ddbt+1 save in DD.BT+1 | |
481 clr <ddbtsz clear out DD.BTSZ | |
482 clr <ddbtsz+1 since DD.BT points to FD | |
1883 | 483 bra around |
484 oldstyle ldb >u048E,u get size of file bits 23-16 | |
1916 | 485 stb <ddbt savein DD.BT |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
486 ldd >u048F,u |
1916 | 487 std <ddbt+1 save in DD.BT+1 |
1883 | 488 ldd <u0006 get size of file bits 15-0 |
1916 | 489 std <ddbtsz save in DD.BTSZ |
1883 | 490 around ldx #$0000 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
491 ldu #DD.BT |
912 | 492 lda <devpath |
1883 | 493 os9 I$Seek seek to DD.BT in LSN0 |
912 | 494 ldu <statptr |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
495 lbcs Bye |
1916 | 496 leax ddbt,u point X to modified DD.BT and DD.BTSZ |
1883 | 497 ldy #DD.DAT-DD.BT write it out |
0 | 498 os9 I$Write |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
499 lbcs Bye |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
500 pshs u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
501 clra |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
502 clrb |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
503 tfr d,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
504 tfr d,u |
912 | 505 lda <devpath |
1883 | 506 os9 I$Seek seek to LSN0 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
507 lbcs Bye |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
508 puls u |
912 | 509 leax <lsn0,u |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
510 ldy #DD.DAT |
912 | 511 lda <devpath |
1883 | 512 os9 I$Read read first part of LSN0 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
513 lbcs Bye |
1233
7bbcfb48124a
Fixed DS boot track bug for sure! Did more minor optimizations.
boisy
parents:
1232
diff
changeset
|
514 ldd #$0001 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
515 lbsr Seek2LSN |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
516 leax sectbuff,u |
912 | 517 ldy <lsn0+DD.MAP,u get number of bytes in device's bitmap |
518 lda <devpath | |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
519 os9 I$Read |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
520 lbcs Bye |
1303 | 521 ldd #Bt.Track*256 boot track |
1883 | 522 ldy #$0004 four bits |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
523 lbsr ABMClear |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
524 bcc L0520 |
1303 | 525 ldd #Bt.Track*256 boot track |
1883 | 526 lbsr Seek2LSN seek to it |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
527 leax <u0017,u |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
528 ldy #$0007 |
912 | 529 lda <devpath |
1883 | 530 os9 I$Read read first seven bytes of boot track |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
531 lbcs Bye |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
532 leax <u0017,u |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
533 ldd ,x |
1883 | 534 cmpd #79*256+83 OS ?? |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
535 lbne WarnUser |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
536 * cmpb #'O |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
537 * lbne WarnUser |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
538 * cmpb #'S |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
539 * lbne WarnUser |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
540 lda $04,x |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
541 cmpa #$12 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
542 beq L0512 |
1303 | 543 ldd #Bt.Track*256+15 boot track, sector 16 |
1916 | 544 ldy #$0003 sectors 16-18 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
545 lbsr ABMClear |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
546 lbcs WarnUser |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
547 L0512 clra |
912 | 548 ldb <lsn0+DD.TKS,u get number of tracks in D |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
549 tfr d,y |
1303 | 550 ldd #Bt.Track*256 boot track |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
551 lbsr ABMSet |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
552 bra L0531 |
1303 | 553 L0520 ldd #Bt.Track*256+4 boot track |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
554 ldy #$000E sectors 5-18 |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
555 lbsr ABMClear |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
556 lbcs WarnUser |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
557 bra L0512 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
558 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
559 L0531 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
560 ldd #$0001 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
561 lbsr Seek2LSN |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
562 leax sectbuff,u |
912 | 563 ldy <lsn0+DD.MAP,u get number of bytes in device's bitmap |
564 lda <devpath | |
1916 | 565 os9 I$Write write out the bitmap |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
566 lbcs Bye |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
567 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
568 * Code added to write alternate boottrack file |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
569 * BGP - 2003/06/26 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
570 tst <btflag |
1916 | 571 beq BTMem get boot track from memory |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
572 lbsr GetSrc |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
573 ldx btfname,u |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
574 lda #READ. |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
575 os9 I$Open |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
576 lbcs Bye |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
577 |
1222
230f052298a5
os9gen's -t now works with Level 1 boot track files, bootlists modified
boisy
parents:
1217
diff
changeset
|
578 IFNE 0 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
579 * Determine if the size of the file is 4608 bytes |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
580 * Note, this assumes 18 sectors per track and 256 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
581 * bytes per sector. |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
582 ldb #SS.Size |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
583 os9 I$GetStt get size |
1916 | 584 tfr u,y put lower 16 bytes of file size in Y |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
585 ldu <statptr |
1916 | 586 lbcs Bye branch if error |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
587 cmpx #$0000 correct size? |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
588 bne BadBTrak branch if not |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
589 cmpy #$1200 correct size? |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
590 beq ReadBTrk branch if not |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
591 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
592 BadBTrak leax BadTkMsg,pcr |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
593 ldy #BadTkMsgL |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
594 lda #$02 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
595 os9 I$WritLn |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
596 lbra Bye |
1222
230f052298a5
os9gen's -t now works with Level 1 boot track files, bootlists modified
boisy
parents:
1217
diff
changeset
|
597 ELSE |
230f052298a5
os9gen's -t now works with Level 1 boot track files, bootlists modified
boisy
parents:
1217
diff
changeset
|
598 ldy #$1200 |
230f052298a5
os9gen's -t now works with Level 1 boot track files, bootlists modified
boisy
parents:
1217
diff
changeset
|
599 ENDC |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
600 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
601 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
602 * Read in boot track file |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
603 * Y = proper boottrack size |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
604 ReadBTrk leax u0496,u point to sector buffer |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
605 os9 I$Read read sector buffer |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
606 lbcs Bye |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
607 os9 I$Close close path to boot track |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
608 lbsr GetDest |
1303 | 609 ldd #Bt.Track*256 boot track |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
610 lbsr Seek2LSN |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
611 bra WrBTrack |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
612 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
613 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
614 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
615 BTMem |
912 | 616 IFGT Level-1 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
617 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
618 * OS-9 Level Two: Link to Rel, which brings in boot code |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
619 pshs u |
1916 | 620 lda #Systm+Objct we want to link to a system object |
621 leax >TheRel,pcr point to REL name | |
622 os9 F$Link link to it | |
623 lbcs L0724 branch if error | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
624 tfr u,d |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
625 puls u |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
626 subd #$0006 |
1916 | 627 std u007B,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
628 lda #$E0 |
1916 | 629 anda u007B,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
630 ora #$1E |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
631 ldb #$FF |
1916 | 632 subd u007B,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
633 addd #$0001 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
634 tfr d,y |
1303 | 635 ldd #Bt.Track*256 boot track |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
636 lbsr Seek2LSN |
1916 | 637 ldx u007B,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
638 |
912 | 639 ELSE |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
640 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
641 * OS-9 Level One: Write out boot track data |
1303 | 642 ldd #Bt.Track*256 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
643 lbsr Seek2LSN |
1300 | 644 ldx #Bt.Start |
645 ldy #Bt.Size | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
646 |
912 | 647 ENDC |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
648 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
649 WrBTrack |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
650 lda <devpath |
0 | 651 os9 I$Write |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
652 lbcs WriteErr |
0 | 653 os9 I$Close |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
654 lbcs Bye |
0 | 655 clrb |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
656 lbra Bye |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
657 |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
658 * Convert Track/Sector to absolute LSN |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
659 * Entry: A = track, B = sector |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
660 * Returns in D |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
661 AbsLSN pshs b |
912 | 662 ldb <lsn0+DD.FMT,u get format byte |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
663 andb #FMT.SIDE test sides bit |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
664 beq AbsLSN1 branch if 1 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
665 ldb #$02 else 2 sides |
1232
5c4b43698a34
Fixed stupid bug where DS disks weren't having their boot track written
boisy
parents:
1222
diff
changeset
|
666 fcb $8C skip next two bytes |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
667 * bra AbsLSN2 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
668 AbsLSN1 ldb #$01 1 side |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
669 AbsLSN2 mul multiply sides times track |
912 | 670 lda <lsn0+DD.TKS,u get device tracks |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
671 mul multiply by (sides * track) |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
672 addb ,s+ add in sector |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
673 * addb ,s add in sector |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
674 adca #$00 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
675 * leas $01,s |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
676 rts |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
677 |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
678 * Bitmap conversion from bit to byte |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
679 * Entry: X = pointer to bitmap |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
680 * D = bit |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
681 * Exit: A = bit mask |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
682 * X = pointer to byte represented by bit D |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
683 L05AA pshs y,b |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
684 lsra divide D by 8 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
685 rorb |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
686 lsra |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
687 rorb |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
688 lsra |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
689 rorb |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
690 leax d,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
691 puls b |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
692 leay <BitMask,pcr |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
693 andb #$07 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
694 lda b,y |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
695 puls pc,y |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
696 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
697 BitMask fcb $80,$40,$20,$10,$08,$04,$02,$01 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
698 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
699 * Clear bits in the allocation bitmap |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
700 * Entry: A = Track, B = Sector, Y = number of bits to clear |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
701 ABMClear pshs x,y,b,a |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
702 bsr AbsLSN convert A:B to LSN |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
703 leax sectbuff,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
704 bsr L05AA |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
705 sta ,-s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
706 bmi L05EA |
1916 | 707 L05D3 lda ,x get byte in bitmap |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
708 sta u007D,u |
1916 | 709 L05D9 anda ,s and with byte on stack |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
710 bne L0616 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
711 leay -1,y |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
712 beq L0612 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
713 lda u007D,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
714 lsr ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
715 bcc L05D9 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
716 leax $01,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
717 L05EA lda #$FF |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
718 sta ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
719 bra L05FA |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
720 L05F0 lda ,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
721 anda ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
722 bne L0616 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
723 leax $01,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
724 leay -$08,y |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
725 L05FA cmpy #$0008 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
726 bhi L05F0 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
727 beq L060C |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
728 lda ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
729 L0604 lsra |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
730 leay -$01,y |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
731 bne L0604 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
732 coma |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
733 sta ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
734 L060C lda ,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
735 anda ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
736 bne L0616 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
737 L0612 andcc #^Carry |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
738 bra L0618 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
739 L0616 orcc #Carry |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
740 L0618 leas $01,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
741 puls pc,y,x,b,a |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
742 |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
743 * Set bits in the allocation bitmap |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
744 * Entry: A = Track, B = Sector, Y = number of bits to set |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
745 ABMSet pshs y,x,b,a |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
746 lbsr AbsLSN |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
747 leax sectbuff,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
748 bsr L05AA |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
749 sta ,-s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
750 bmi L063A |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
751 lda ,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
752 L062C ora ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
753 leay -$01,y |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
754 beq L0658 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
755 lsr ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
756 bcc L062C |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
757 sta ,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
758 leax $01,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
759 L063A lda #$FF |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
760 bra L0644 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
761 L063E sta ,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
762 leax $01,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
763 leay -$08,y |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
764 L0644 cmpy #$0008 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
765 bhi L063E |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
766 beq L0658 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
767 L064C lsra |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
768 leay -$01,y |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
769 bne L064C |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
770 coma |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
771 sta ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
772 lda ,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
773 ora ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
774 L0658 sta ,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
775 leas $01,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
776 puls pc,y,x,b,a |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
777 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
778 Seek2LSN pshs u,y,x,b,a |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
779 lbsr AbsLSN |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
780 pshs a |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
781 tfr b,a |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
782 clrb |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
783 tfr d,u |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
784 puls b |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
785 clra |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
786 tfr d,x |
912 | 787 lda <devpath |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
788 os9 I$Seek |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
789 lbcs WriteErr |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
790 puls pc,u,y,x,b,a |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
791 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
792 clra |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
793 clrb |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
794 tfr d,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
795 tfr d,u |
912 | 796 lda <devpath |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
797 os9 I$Seek |
912 | 798 leax <lsn0,u |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
799 ldy #DD.DAT |
912 | 800 lda <devpath |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
801 os9 I$Write |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
802 bcs Bye |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
803 rts |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
804 |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
805 * Routine to write various error messages then exiting |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
806 WriteErr leax >ErrWrit,pcr |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
807 bra WritExit |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
808 BadName ldb #E$BPNam |
921
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
809 ShowHelp equ * |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
810 IFNE DOHELP |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
811 leax >HelpMsg,pcr |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
812 ELSE |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
813 clrb |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
814 bra Bye |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
815 ENDC |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
816 WritExit pshs b |
0 | 817 lda #$02 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
818 ldy #256 |
0 | 819 os9 I$WritLn |
820 puls b | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
821 Bye os9 F$Exit |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
822 |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
823 * Source/Destination Disk Switch Routine |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
824 GetSrc pshs u,y,x,b,a |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
825 clra |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
826 bra TstSingl |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
827 GetDest pshs u,y,x,b,a |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
828 lda #$01 |
912 | 829 TstSingl tst <sngldrv |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
830 beq L06FD |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
831 AskUser pshs a |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
832 AskUser2 tsta |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
833 bne Ask4Dst |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
834 Ask4Src leax >Source,pcr |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
835 ldy #SourceL |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
836 bra L06D4 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
837 Ask4Dst leax >Destin,pcr |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
838 ldy #DestinL |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
839 L06D4 bsr DoWrite |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
840 leax ,-s |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
841 ldy #$0001 |
1916 | 842 lda #$02 read from stderr |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
843 os9 I$Read read one char |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
844 lda ,s+ |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
845 eora #'C |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
846 anda #$DF |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
847 beq L06F9 branch if it's a C |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
848 leax >TheBell,pcr |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
849 ldy #$0001 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
850 bsr DoWrite else ring the error bell |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
851 bsr WriteCR |
1215 | 852 * BUG FIX: in certain cases, puls a was being done twice. |
853 lda ,s ++ | |
854 * puls a -- | |
855 bra AskUser2 ++ | |
856 * bne AskUser -- | |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
857 L06F9 bsr WriteCR |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
858 puls a |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
859 L06FD puls pc,u,y,x,b,a |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
860 |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
861 DoWrite lda #$01 |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
862 os9 I$WritLn |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
863 rts |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
864 |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
865 WriteCR pshs y,x,a |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
866 lda #$01 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
867 leax >CarRet,pcr |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
868 ldy #80 |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
869 os9 I$WritLn |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
870 puls pc,y,x,a |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
871 |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
872 ItsFragd leax >BootFrag,pcr |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
873 SoftExit ldb #$01 |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
874 bra WritExit |
1215 | 875 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
876 WarnUser leax >TWarn,pcr |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
877 bra SoftExit |
168
3a847d2b4492
Cobbler, OS9Gen and format are all hardware dependent.
roug
parents:
124
diff
changeset
|
878 |
912 | 879 IFGT Level-1 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
880 L0724 leax >CantRel,pcr |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
881 lbra WritExit |
912 | 882 ENDC |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
883 |
0 | 884 emod |
885 eom equ * | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
886 end |