Mercurial > hg > Members > kono > nitros9-code
annotate level1/cmds/os9gen.asm @ 3169:1ff3d7673e36
mc09 l2: bring sys/makefile in line with latest organisation for other platforms
Revise bootfiles/makefile to remove sysgo from bootfile - it can be
found on the root of the disk.
author | Neal Crook <foofoobedoo@gmail.com> |
---|---|
date | Mon, 17 Apr 2017 22:59:28 +0100 |
parents | d706cc0dfd58 |
children | d80acb6d104b |
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. |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
31 * |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
32 * 13 2011/09/13 Robert Gault |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
33 * A flexible buffer is now used to hold the FAT map. |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
34 * The boot file name is now copied into the data space for which |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
35 * 160 bytes are reserved. F$Mem trashes parameter space. |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
36 * DD.BIT can now be used to obtain a reasonably sized FAT with large drives. |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
37 * Added error message if not enough room for bit map. |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
38 * Replace sectbuff with bitmbuff for all FAT (DD.MAP) work. |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
39 * Moved common code in ABMClear & ABMSet to subroutine. |
2582
af48b1e02c6c
Corrected silly typo which occured during upload.
robertgault
parents:
2581
diff
changeset
|
40 * |
af48b1e02c6c
Corrected silly typo which occured during upload.
robertgault
parents:
2581
diff
changeset
|
41 * 14 2011/09/16 Robert Gault |
af48b1e02c6c
Corrected silly typo which occured during upload.
robertgault
parents:
2581
diff
changeset
|
42 * Corrected a typo which occured when committing code. Exit of Initcalc had |
2584
f7f97fe766e3
One more and hopefully last minor oversight correction R.G.
robertgault
parents:
2582
diff
changeset
|
43 * ABM3 in wrong place. Also included C$CR in file name copy. |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
44 * |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
45 * 2011/09/18 Robert Gault |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
46 * Cleaned up code and removed multiple calculations of shift divisor by |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
47 * calculating it once and storing it in data. |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
48 * Corrected sector count calculation to include partial clusters. |
2066
208c8e8dd175
Initialized eflag. Without it, all bootfiles were extended.
chrish
parents:
1916
diff
changeset
|
49 |
1166 | 50 nam OS9Gen |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
51 ttl OS-9 bootfile generator |
0 | 52 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
53 * Disassembled 02/07/06 13:11:11 by Disasm v1.6 (C) 1988 by RML |
0 | 54 |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
55 *Needed for stand alone compile |
2586 | 56 *LEVEL equ 2 |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
57 |
912 | 58 IFP1 |
122 | 59 use defsfile |
912 | 60 ENDC |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
172
diff
changeset
|
61 |
921
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
62 DOHELP set 0 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
63 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
|
64 |
0 | 65 tylg set Prgrm+Objct |
66 atrv set ReEnt+rev | |
1916 | 67 rev set $00 |
2066
208c8e8dd175
Initialized eflag. Without it, all bootfiles were extended.
chrish
parents:
1916
diff
changeset
|
68 edition set 12 |
262
dd9e2f44b5f0
Incorporated bug fix from January 1987 Rainbow, pg 203
boisy
parents:
213
diff
changeset
|
69 |
0 | 70 mod eom,name,tylg,atrv,start,size |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
172
diff
changeset
|
71 |
912 | 72 org 0 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
73 btfname rmb 2 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
74 btflag rmb 1 |
1916 | 75 qfname rmb 2 |
76 qflag rmb 1 | |
77 rflag rmb 1 | |
912 | 78 statptr rmb 2 |
79 bfpath rmb 1 | |
80 devpath rmb 1 | |
81 parmpath rmb 1 | |
1916 | 82 u0005 rmb 1 Needed? |
0 | 83 u0006 rmb 2 |
1916 | 84 ddbt rmb 3 |
85 ddbtsz rmb 2 | |
0 | 86 u000D rmb 2 |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
87 u000F rmb 2 |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
88 u0011 rmb 2 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
89 u0013 rmb 2 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
90 u0015 rmb 2 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
91 u0017 rmb 7 |
912 | 92 devopts rmb 20 |
1916 | 93 bfdlsn rmb 3 |
94 u0035 rmb 9 | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
95 u003E rmb 2 |
1916 | 96 eflag rmb 1 |
912 | 97 sngldrv rmb 1 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
98 bootdev rmb 32 |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
99 btshift rmb 2 |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
100 bitflag rmb 1 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
101 lsn0 rmb 26 |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
102 btfstr rmb 160 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
103 u007B rmb 2 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
104 u007D rmb 1 |
912 | 105 sectbuff rmb 1024 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
106 u047E rmb 16 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
107 u048E rmb 1 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
108 u048F rmb 7 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
109 u0496 rmb 7018 |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
110 |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
111 bitmbuf equ . |
0 | 112 size equ . |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
172
diff
changeset
|
113 |
1217 | 114 name fcs /OS9Gen/ |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
172
diff
changeset
|
115 fcb edition |
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
172
diff
changeset
|
116 |
921
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
117 IFNE DOHELP |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
118 HelpMsg fcb C$LF |
1883 | 119 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
|
120 fcb C$LF |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
121 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
|
122 fcb C$LF |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
123 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
|
124 fcb C$LF |
1916 | 125 fcc " -e = extended boot (fragmented)" |
126 fcb C$LF | |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
127 fcc " -s = single drive operation" |
1215 | 128 fcb C$LF |
1217 | 129 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
|
130 fcb C$LF,C$CR |
921
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
131 ENDC |
122 | 132 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
|
133 ErrWrit fcb C$LF |
122 | 134 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
|
135 fcb C$CR |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
136 MemErr fcb C$LF |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
137 fcc "Not enough memory for bit map" |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
138 fcb C$CR |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
139 TrkErr fcb C$LF |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
140 fcc "Can't read data" |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
141 fcb C$CR |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
142 IFEQ DOHD |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
143 HDGen fcb C$LF |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
144 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
|
145 fcb C$CR |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
146 ENDC |
912 | 147 IFGT Level-1 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
148 CantRel fcb C$LF |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
149 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
|
150 fcb C$CR |
912 | 151 ENDC |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
152 CarRet fcb C$CR |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
153 TheBell fcb C$BELL |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
154 TWarn fcb C$LF |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
155 fcc "Warning - file(s) present" |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
156 fcb C$LF |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
157 fcc "on track " |
1303 | 158 IFEQ Bt.Track-34 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
159 fcc "34" |
912 | 160 ELSE |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
161 fcc "??" |
912 | 162 ENDC |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
163 fcc " - this track" |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
164 fcb C$LF |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
165 fcc "not rewritten." |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
166 fcb C$CR |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
167 BootFrag fcb C$LF |
1215 | 168 fcc "Error - OS9Boot file fragmented" |
122 | 169 fcb C$CR |
1222
230f052298a5
os9gen's -t now works with Level 1 boot track files, bootlists modified
boisy
parents:
1217
diff
changeset
|
170 IFNE 0 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
171 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
|
172 fcb C$CR |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
173 BadTkMsgL equ *-BadTkMsg |
1222
230f052298a5
os9gen's -t now works with Level 1 boot track files, bootlists modified
boisy
parents:
1217
diff
changeset
|
174 ENDC |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
175 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
|
176 SourceL equ *-Source |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
177 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
|
178 DestinL equ *-Destin |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
179 Rename fcc "RENAME " |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
180 TempBoot fcc "TempBoot " |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
181 fcb $FF |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
182 OS9Boot fcc "OS9Boot" |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
183 fcb C$CR |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
184 fcb $FF |
912 | 185 IFGT Level-1 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
186 TheRel fcc "Rel" |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
187 fcb $FF |
912 | 188 ENDC |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
189 |
1916 | 190 * Here's how registers are set when this process is forked: |
191 * | |
192 * +-----------------+ <-- Y (highest address) | |
193 * ! Parameter ! | |
194 * ! Area ! | |
195 * +-----------------+ <-- X, SP | |
196 * ! Data Area ! | |
197 * +-----------------+ | |
198 * ! Direct Page ! | |
199 * +-----------------+ <-- U, DP (lowest address) | |
200 * | |
201 * D = parameter area size | |
202 * PC = module entry point abs. address | |
203 * CC = F=0, I=0, others undefined | |
204 | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
205 start clrb |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
206 stb <btflag assume no -t specified |
0 | 207 stb <u0005 |
912 | 208 stb <sngldrv assume multi-drive |
2066
208c8e8dd175
Initialized eflag. Without it, all bootfiles were extended.
chrish
parents:
1916
diff
changeset
|
209 stb <eflag assume not extended bootfile |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
210 stu <statptr save statics pointer |
1916 | 211 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
|
212 pshs u |
1916 | 213 tfr y,d copy pointer to top of our mem in D |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
214 subd ,s++ D = Y-u047e = 7039 |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
215 subd #u047E D = 5889 = $1701 What is it? R.G. |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
216 clrb |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
217 std <u0011 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
218 lda #PDELIM |
1916 | 219 cmpa ,x first char of device name a path delimiter? |
220 lbne BadName branch if not (bad name) | |
221 os9 F$PrsNam else parse name | |
222 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
|
223 lda #PDELIM |
0 | 224 cmpa ,y |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
225 lbeq BadName |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
226 pshs b,a |
1916 | 227 parseopt lda ,y+ get next character |
228 cmpa #'- dash? | |
229 beq parsein branch if so | |
230 cmpa #C$CR end of line? | |
231 beq getdev branch if so | |
232 bra parseopt else continue to parse options | |
233 parsein ldd ,y+ get two chars after - | |
234 cmpa #C$CR end of line? | |
235 beq getdev branch if so | |
236 cmpa #C$SPAC space? | |
237 beq parseopt yes, look for next char | |
238 anda #$DF else make value in A uppercase | |
239 cmpa #'R is it R? | |
240 beq remboot branch if so | |
241 cmpa #'S is it S? | |
242 beq onedrive branch if so | |
243 cmpa #'E is it E | |
244 beq extend branch if so | |
245 cmpd #81*256+61 does D = 'Q=' | |
246 beq quick | |
247 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
|
248 lbne SoftExit |
1916 | 249 leay 1,y point past = |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
250 * sty <btfname save pointer to boottrack filename R.G. |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
251 sta <btflag |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
252 pshs x copy btfname into data space |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
253 leax btfstr,u making room to expand the data space R.G. |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
254 stx btfname,u |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
255 * Skip over non-spaces and non-CRs |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
256 SkipNon lda ,y+ |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
257 cmpa #C$CR |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
258 beq getdev2 we must recover regX |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
259 cmpa #C$SPAC |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
260 beq parseopt2 "" |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
261 sta ,x+ |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
262 bra SkipNon |
2584
f7f97fe766e3
One more and hopefully last minor oversight correction R.G.
robertgault
parents:
2582
diff
changeset
|
263 getdev2 sta ,x this was added in rev 14 to correct an oversight R.G. |
f7f97fe766e3
One more and hopefully last minor oversight correction R.G.
robertgault
parents:
2582
diff
changeset
|
264 puls x |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
265 bra getdev |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
266 parseopt2 puls x |
1916 | 267 bra parseopt |
268 remboot inc <rflag remove bootfile reference from LSN0 flag | |
269 bra parsein | |
270 onedrive inc <sngldrv set single drive flag | |
271 bra parsein | |
272 extend inc <eflag set extended boot flag | |
273 bra parsein | |
274 quick leay 1,y point past = | |
275 sty <qfname save pointer to quick filename | |
276 sta <qflag | |
277 getdev puls b,a | |
278 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
|
279 L0239 sta ,y+ |
0 | 280 lda ,x+ |
281 decb | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
282 bpl L0239 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
283 sty <u003E |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
284 ldd #PENTIR*256+C$SPAC |
0 | 285 std ,y++ |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
286 lbsr GetDest |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
287 leax <bootdev,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
288 lda #UPDAT. |
0 | 289 os9 I$Open |
912 | 290 sta <devpath |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
291 lbcs ShowHelp |
912 | 292 leax <devopts,u |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
293 clrb |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
294 * ldb #SS.Opt |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
295 os9 I$GetStt |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
296 lbcs Bye |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
297 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
298 IFEQ DOHD |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
299 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
300 * If destination drive is hard disk, don't allow |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
301 leax devopts,u |
912 | 302 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
|
303 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
|
304 clrb |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
305 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
|
306 lbra WritExit |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
307 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
308 ENDC |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
309 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
310 L0276 ldx <u003E |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
311 leay >TempBoot,pcr |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
312 lda #PDELIM |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
313 L027E sta ,x+ |
0 | 314 lda ,y+ |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
315 bpl L027E |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
316 * 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
|
317 leay >OS9Boot,pcr |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
318 L0288 lda ,y+ |
0 | 319 sta ,x+ |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
320 bpl L0288 |
0 | 321 tfr x,d |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
322 leax <bootdev,u |
0 | 323 pshs x |
324 subd ,s++ | |
325 std <u000D | |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
326 ldd #WRITE.*256+(READ.+WRITE.) |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
327 * lda #WRITE. |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
328 * ldb #READ.+WRITE. |
0 | 329 os9 I$Create |
912 | 330 sta <bfpath |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
331 lbcs Bye |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
332 ldx #$0000 upper 16 bits are zero |
0 | 333 stx <u0006 |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
334 ldu #$3000 |
169 | 335 ldb #SS.Size |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
336 os9 I$SetStt set size of newly created file |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
337 lbcs Bye branch if error |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
338 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
|
339 bsr L032F |
1217 | 340 |
341 * Read Bootlist file, line by line | |
342 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
|
343 ldy #256 |
1916 | 344 clra standard input |
912 | 345 os9 I$ReadLn read line |
346 bcs L0312 branch if error | |
1916 | 347 lda ,x else get byte in A |
912 | 348 ldb #E$EOF and EOF error in B |
349 cmpa #C$CR CR? | |
350 beq L0312 branch if so | |
1916 | 351 cmpa #'* comment? |
1217 | 352 beq ReadBLst continue reading if so |
912 | 353 lda #READ. else use read perms |
354 os9 I$Open open file at X (line we read) | |
355 bcs L031A branch if error | |
356 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
|
357 L02DD ldx <u0015 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
358 ldd <u0011 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
359 subd <u0013 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
360 tfr d,y |
912 | 361 lda <parmpath |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
362 os9 I$Read |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
363 bcc L02F9 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
364 cmpb #E$EOF |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
365 lbne Bye |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
366 os9 I$Close |
912 | 367 clr <parmpath |
1217 | 368 bra ReadBLst |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
369 L02F9 tfr y,d |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
370 leax d,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
371 stx <u0015 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
372 addd <u0013 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
373 std <u0013 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
374 cmpd <u0011 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
375 bcs L030C |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
376 bsr L032B |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
377 bcs L0328 |
912 | 378 L030C tst <parmpath |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
379 bne L02DD |
1217 | 380 bra ReadBLst |
912 | 381 L0312 cmpb #E$EOF end of file? |
382 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
|
383 bsr L033D |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
384 bra L0377 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
385 L031A pshs b |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
386 leax sectbuff,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
387 ldy #256 |
912 | 388 lda #$02 standard error |
389 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
|
390 L0328 lbra Bye |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
391 L032B bsr L033D |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
392 bcs L033C |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
393 L032F lbsr GetSrc |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
394 clra |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
395 clrb |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
396 std <u0013 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
397 leax >u047E,u |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
398 stx <u0015 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
399 L033C rts |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
400 L033D lbsr GetDest |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
401 ldd <u0013 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
402 beq L033C |
912 | 403 tst <sngldrv single drive? |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
404 beq L0361 branch if not |
912 | 405 lda <devpath |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
406 ldx #$0000 |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
407 ldu #$0000 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
408 os9 I$Seek seek to LSN0 |
912 | 409 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
|
410 bcs L033C |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
411 leax sectbuff,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
412 ldy #256 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
413 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
|
414 bcs L033C |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
415 lbsr FShift |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
416 sty btshift,u save divisor value R.G. |
1883 | 417 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
|
418 leax >u047E,u |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
419 ldy <u0013 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
420 os9 I$Write |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
421 bcs L033C |
0 | 422 tfr y,d |
423 addd <u0006 | |
424 std <u0006 | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
425 clrb |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
426 rts |
912 | 427 L0377 leax <devopts,u |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
428 clrb |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
429 * ldb #SS.Opt |
912 | 430 lda <bfpath |
0 | 431 os9 I$GetStt |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
432 lbcs Bye |
1883 | 433 lda <bfpath get bootfile path |
0 | 434 ldx #$0000 |
435 ldu <u0006 | |
1883 | 436 ldb #SS.Size set bootfile size |
0 | 437 os9 I$SetStt |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
438 lbcs Bye |
912 | 439 ldu <statptr |
0 | 440 os9 I$Close |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
441 lbcs ShowHelp |
1883 | 442 |
1916 | 443 tst <eflag extended boot option used? |
1883 | 444 bne nonfrag yes, don't check for fragmented file |
445 | |
1916 | 446 ldx <bfdlsn,u load X/U with LSN of bootfile fd sector |
447 lda <bfdlsn+2,u | |
1883 | 448 clrb round off to sector boundary |
0 | 449 tfr d,u |
1883 | 450 lda <devpath get path to raw device |
451 os9 I$Seek seek | |
912 | 452 ldu <statptr |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
453 lbcs Bye |
1883 | 454 leax >u047E,u point to buffer |
455 ldy #256 read one sector | |
456 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
|
457 lbcs Bye |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
458 ldd >u047E+(FD.SEG+FDSL.S+FDSL.B),u |
1883 | 459 lbne ItsFragd if not zero, file is fragmented |
1916 | 460 nonfrag lda <devpath get the device path |
0 | 461 ldx #$0000 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
462 ldu #DD.BT |
1916 | 463 os9 I$Seek seek to DD.BT in LSN0 |
912 | 464 ldu <statptr |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
465 lbcs Bye |
1916 | 466 leax ddbt,u point to our internal ddbt copy in statics |
467 ldy #DD.DAT-DD.BT we want DD.BT and DD.BTSZ into ddbt,u | |
468 os9 I$Read so read bootstrap sector and bootfile size | |
1883 | 469 lbcs Bye branch if error |
1916 | 470 ldd <ddbtsz get DD.BTSZ in D |
1883 | 471 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
|
472 ldx <u003E |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
473 leay >OS9Boot,pcr |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
474 lda #PDELIM |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
475 L03F3 sta ,x+ |
0 | 476 lda ,y+ |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
477 bpl L03F3 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
478 leax <bootdev,u |
1916 | 479 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
|
480 ldx <u003E |
1916 | 481 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
|
482 lda #PDELIM |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
483 L0407 sta ,x+ |
0 | 484 lda ,y+ |
1916 | 485 bpl L0407 copy it into buffer |
912 | 486 L040D tst <sngldrv |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
487 beq L042E |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
488 clra |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
489 leax >Rename,pcr |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
490 os9 F$Link |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
491 bcc L0428 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
492 lbsr GetSrc |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
493 os9 F$Load |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
494 lbcs Bye |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
495 lbsr GetDest |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
496 L0428 tfr u,d |
912 | 497 ldu <statptr |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
498 std u000F,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
499 L042E lda #$01 |
0 | 500 clrb |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
501 leax >Rename,pcr |
0 | 502 ldy <u000D |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
503 leau <bootdev,u |
1916 | 504 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
|
505 lbcs Bye |
0 | 506 os9 F$Wait |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
507 lbcs Bye |
0 | 508 tstb |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
509 lbne Bye |
912 | 510 tst <sngldrv |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
511 beq L045F |
912 | 512 ldu <statptr |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
513 ldd u000F,u |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
514 tfr d,u |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
515 os9 F$UnLink |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
516 lbcs Bye |
912 | 517 L045F ldu <statptr |
1916 | 518 tst <eflag extended boot? |
519 beq oldstyle branch if not | |
520 lda <bfdlsn,u get LSN of fdsect | |
521 stb <ddbt save in DD.BT | |
522 ldd <bfdlsn+1,u | |
523 std <ddbt+1 save in DD.BT+1 | |
524 clr <ddbtsz clear out DD.BTSZ | |
525 clr <ddbtsz+1 since DD.BT points to FD | |
1883 | 526 bra around |
527 oldstyle ldb >u048E,u get size of file bits 23-16 | |
1916 | 528 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
|
529 ldd >u048F,u |
1916 | 530 std <ddbt+1 save in DD.BT+1 |
1883 | 531 ldd <u0006 get size of file bits 15-0 |
1916 | 532 std <ddbtsz save in DD.BTSZ |
1883 | 533 around ldx #$0000 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
534 ldu #DD.BT |
912 | 535 lda <devpath |
1883 | 536 os9 I$Seek seek to DD.BT in LSN0 |
912 | 537 ldu <statptr |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
538 lbcs Bye |
1916 | 539 leax ddbt,u point X to modified DD.BT and DD.BTSZ |
1883 | 540 ldy #DD.DAT-DD.BT write it out |
0 | 541 os9 I$Write |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
542 lbcs Bye |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
543 pshs u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
544 clra |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
545 clrb |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
546 tfr d,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
547 tfr d,u |
912 | 548 lda <devpath |
1883 | 549 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
|
550 lbcs Bye |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
551 puls u |
912 | 552 leax <lsn0,u |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
553 ldy #DD.DAT |
912 | 554 lda <devpath |
1883 | 555 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
|
556 lbcs Bye |
1233
7bbcfb48124a
Fixed DS boot track bug for sure! Did more minor optimizations.
boisy
parents:
1232
diff
changeset
|
557 ldd #$0001 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
558 lbsr Seek2LSN |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
559 * leax sectbuff,u R.G. Expand memory to hold buffer |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
560 ldd <lsn0+DD.MAP,u |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
561 addd #bitmbuf+256 expand memory by DD.MAP+256 bytes |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
562 os9 F$Mem |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
563 leax MemErr,pcr |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
564 lbcs WritExit |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
565 tfr y,s relocate stack |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
566 |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
567 * leax sectbuff,u |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
568 leax bitmbuf,u |
912 | 569 ldy <lsn0+DD.MAP,u get number of bytes in device's bitmap |
570 lda <devpath | |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
571 os9 I$Read read the FAT into the bitmbuf |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
572 leax TrkErr,pcr |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
573 lbcs WritExit |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
574 |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
575 ldd #Bt.Track*256 boot track regD=$2200 |
1883 | 576 ldy #$0004 four bits |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
577 lbsr ABMClear this should test for clear not clear it |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
578 bcc L0520 |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
579 ldd #Bt.Track*256 boot track, as it was not clear |
1883 | 580 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
|
581 leax <u0017,u |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
582 ldy #$0007 |
912 | 583 lda <devpath |
1883 | 584 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
|
585 lbcs Bye |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
586 leax <u0017,u |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
587 ldd ,x |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
588 cmpd #256*'O+'S is this an OS-9 boot track |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
589 lbne WarnUser go if not |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
590 * cmpb #'O |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
591 * lbne WarnUser |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
592 * cmpb #'S |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
593 * lbne WarnUser |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
594 lda $04,x |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
595 cmpa #$12 also check for NOP |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
596 beq L0512 |
1303 | 597 ldd #Bt.Track*256+15 boot track, sector 16 |
1916 | 598 ldy #$0003 sectors 16-18 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
599 lbsr ABMClear |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
600 lbcs WarnUser |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
601 L0512 clra |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
602 ldb <lsn0+DD.TKS,u get number of sectors in D |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
603 tfr d,y |
1303 | 604 ldd #Bt.Track*256 boot track |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
605 lbsr ABMSet |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
606 bra L0531 |
1303 | 607 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
|
608 ldy #$000E sectors 5-18 |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
609 lbsr ABMClear test rest of track |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
610 lbcs WarnUser |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
611 bra L0512 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
612 |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
613 * Write altered map back to disk |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
614 L0531 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
615 ldd #$0001 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
616 lbsr Seek2LSN |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
617 * leax sectbuff,u |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
618 leax bitmbuf,u |
912 | 619 ldy <lsn0+DD.MAP,u get number of bytes in device's bitmap |
620 lda <devpath | |
1916 | 621 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
|
622 lbcs Bye |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
623 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
624 * Code added to write alternate boottrack file |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
625 * BGP - 2003/06/26 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
626 tst <btflag |
1916 | 627 beq BTMem get boot track from memory |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
628 lbsr GetSrc |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
629 ldx btfname,u |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
630 lda #READ. |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
631 os9 I$Open |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
632 lbcs Bye |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
633 |
1222
230f052298a5
os9gen's -t now works with Level 1 boot track files, bootlists modified
boisy
parents:
1217
diff
changeset
|
634 IFNE 0 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
635 * 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
|
636 * Note, this assumes 18 sectors per track and 256 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
637 * bytes per sector. |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
638 ldb #SS.Size |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
639 os9 I$GetStt get size |
1916 | 640 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
|
641 ldu <statptr |
1916 | 642 lbcs Bye branch if error |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
643 cmpx #$0000 correct size? |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
644 bne BadBTrak branch if not |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
645 cmpy #$1200 correct size? |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
646 beq ReadBTrk branch if not |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
647 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
648 BadBTrak leax BadTkMsg,pcr |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
649 ldy #BadTkMsgL |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
650 lda #$02 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
651 os9 I$WritLn |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
652 lbra Bye |
1222
230f052298a5
os9gen's -t now works with Level 1 boot track files, bootlists modified
boisy
parents:
1217
diff
changeset
|
653 ELSE |
230f052298a5
os9gen's -t now works with Level 1 boot track files, bootlists modified
boisy
parents:
1217
diff
changeset
|
654 ldy #$1200 |
230f052298a5
os9gen's -t now works with Level 1 boot track files, bootlists modified
boisy
parents:
1217
diff
changeset
|
655 ENDC |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
656 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
657 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
658 * Read in boot track file |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
659 * Y = proper boottrack size |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
660 ReadBTrk leax u0496,u point to sector buffer |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
661 os9 I$Read read sector buffer |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
662 lbcs Bye |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
663 os9 I$Close close path to boot track |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
664 lbsr GetDest |
1303 | 665 ldd #Bt.Track*256 boot track |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
666 lbsr Seek2LSN |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
667 bra WrBTrack |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
668 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
669 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
670 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
671 BTMem |
912 | 672 IFGT Level-1 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
673 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
674 * 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
|
675 pshs u |
1916 | 676 lda #Systm+Objct we want to link to a system object |
677 leax >TheRel,pcr point to REL name | |
678 os9 F$Link link to it | |
679 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
|
680 tfr u,d |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
681 puls u |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
682 subd #$0006 |
1916 | 683 std u007B,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
684 lda #$E0 |
1916 | 685 anda u007B,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
686 ora #$1E |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
687 ldb #$FF |
1916 | 688 subd u007B,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
689 addd #$0001 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
690 tfr d,y |
1303 | 691 ldd #Bt.Track*256 boot track |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
692 lbsr Seek2LSN |
1916 | 693 ldx u007B,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
694 |
912 | 695 ELSE |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
696 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
697 * OS-9 Level One: Write out boot track data |
1303 | 698 ldd #Bt.Track*256 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
699 lbsr Seek2LSN |
1300 | 700 ldx #Bt.Start |
701 ldy #Bt.Size | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
702 |
912 | 703 ENDC |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
704 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
705 WrBTrack |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
706 lda <devpath |
0 | 707 os9 I$Write |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
708 lbcs WriteErr |
0 | 709 os9 I$Close |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
710 lbcs Bye |
0 | 711 clrb |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
712 lbra Bye |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
713 |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
714 * Convert Track/Sector to absolute LSN |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
715 * Entry: A = track, B = sector |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
716 * Returns in D |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
717 AbsLSN pshs b |
912 | 718 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
|
719 andb #FMT.SIDE test sides bit |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
720 beq AbsLSN1 branch if 1 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
721 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
|
722 fcb $8C skip next two bytes |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
723 * bra AbsLSN2 |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
724 AbsLSN1 ldb #$01 1 side |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
725 AbsLSN2 mul multiply sides times track |
912 | 726 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
|
727 mul multiply by (sides * track) |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
728 addb ,s+ add in sector |
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
729 * 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
|
730 adca #$00 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
731 * leas $01,s |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
732 rts |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
733 |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
734 * Determine bit shift from DD.BIT R.G. |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
735 * Return shift in regY needed for division |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
736 FShift pshs d |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
737 ldd lsn0+DD.BIT,u get sectors per cluster |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
738 ldy #-1 |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
739 * This finds number of bit shifts for DD.BIT R.G. |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
740 SF1 lsra |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
741 rorb |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
742 leay 1,y |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
743 cmpd #0 |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
744 bne SF1 |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
745 puls d,pc |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
746 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
747 |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
748 * Returns bit in bitmap corresponding to LSN in regA |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
749 * X=bitmap buffer, on exit X points to bitmap byte of our LSN |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
750 L05AA |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
751 * We need to divide by DD.BITx8 R.G. |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
752 pshs y,d |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
753 ldy btshift,u |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
754 cmpy #0 |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
755 beq GBB3 |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
756 * Divide LSN by DD.BIT R.G. |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
757 GBB2 lsra |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
758 rorb |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
759 leay -1,y |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
760 bne GBB2 |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
761 GBB3 stb ,s save lsb |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
762 andb #7 Make sure offset within table |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
763 stb 1,s save table mask |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
764 ldy #3 |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
765 * Now regY is the number of right shifts required for 8 R.G. |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
766 ldb ,s recover the lsb |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
767 GBB4 lsra |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
768 rorb |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
769 leay -1,y |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
770 bne GBB4 |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
771 * Now regD is the byte number in the FAT |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
772 leax d,x point regX at the byte |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
773 puls d |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
774 leay <BitTable,pcr Point to bit table |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
775 lda b,y Get bit from table |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
776 puls pc,y Restore regY and return |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
777 |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
778 BitTable fcb $80,$40,$20,$10,$08,$04,$02,$01 Bitmap bit table |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
779 |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
780 * Common routine used by ABMSet & ABMClear R.G. |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
781 * Enter: see ABMSet & ABMClear |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
782 * Exit: regY=divisor, regD=LSN |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
783 Initcalc bsr AbsLSN convert A:B to LSN |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
784 leax bitmbuf,u |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
785 bsr L05AA getbitmapbit |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
786 pshs d,y |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
787 ldy btshift R.G. code to include DD.BIT |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
788 cmpy #0 |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
789 bne ABM2 |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
790 puls d,y,pc |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
791 ABM2 ldd 2,s recover regY sector count |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
792 clr bitflag,u |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
793 * Divide sector count by DD.BIT |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
794 ABMlp lsra |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
795 rorb |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
796 bcc ABMlp2 |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
797 inc bitflag,u mark carry over |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
798 ABMlp2 leay -1,y |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
799 bne ABMlp |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
800 tst bitflag,u |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
801 beq ABMnz |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
802 incb include partial cluster |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
803 ABMnz tfr d,y regY has been divided by DD.BIT |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
804 ldd ,s recover content |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
805 leas 4,s clean stack |
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
806 ABM3 rts |
2582
af48b1e02c6c
Corrected silly typo which occured during upload.
robertgault
parents:
2581
diff
changeset
|
807 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
808 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
809 * Clear bits in the allocation bitmap |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
810 * 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
|
811 ABMClear pshs x,y,b,a |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
812 bsr Initcalc |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
813 * Back to older code |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
814 sta ,-s save map bit |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
815 bmi L05EA go if bit #7 |
1916 | 816 L05D3 lda ,x get byte in bitmap |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
817 sta u007D,u |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
818 L05D9 anda ,s test byte on stack |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
819 bne L0616 go if already set |
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
820 leay -1,y next bit to test |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
821 beq L0612 |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
822 lda u007D,u |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
823 lsr ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
824 bcc L05D9 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
825 leax $01,x |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
826 L05EA lda #$FF |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
827 sta ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
828 bra L05FA |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
829 L05F0 lda ,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
830 anda ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
831 bne L0616 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
832 leax $01,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
833 leay -$08,y |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
834 L05FA cmpy #$0008 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
835 bhi L05F0 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
836 beq L060C |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
837 lda ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
838 L0604 lsra |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
839 leay -$01,y |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
840 bne L0604 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
841 coma |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
842 sta ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
843 L060C lda ,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
844 anda ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
845 bne L0616 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
846 L0612 andcc #^Carry |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
847 bra L0618 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
848 L0616 orcc #Carry |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
849 L0618 leas $01,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
850 puls pc,y,x,b,a |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
851 |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
852 * Set bits in the allocation bitmap |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
853 * 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
|
854 ABMSet pshs y,x,b,a |
2585
75847753c6a3
Cleaned up code and removed multiple calculations of shift divisor by
robertgault
parents:
2584
diff
changeset
|
855 lbsr Initcalc |
2581
538be58c2c2d
Support for DD.BIT has been added. The buffer for the bit map is calculated on the fly instead of being hard coded. To prevent parameter corruption by memory expansion, the parameters are copied into the data area.
robertgault
parents:
2147
diff
changeset
|
856 * Back to old code |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
857 sta ,-s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
858 bmi L063A |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
859 lda ,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
860 L062C ora ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
861 leay -$01,y |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
862 beq L0658 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
863 lsr ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
864 bcc L062C |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
865 sta ,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
866 leax $01,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
867 L063A lda #$FF |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
868 bra L0644 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
869 L063E sta ,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
870 leax $01,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
871 leay -$08,y |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
872 L0644 cmpy #$0008 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
873 bhi L063E |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
874 beq L0658 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
875 L064C lsra |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
876 leay -$01,y |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
877 bne L064C |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
878 coma |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
879 sta ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
880 lda ,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
881 ora ,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
882 L0658 sta ,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
883 leas $01,s |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
884 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
|
885 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
886 Seek2LSN pshs u,y,x,b,a |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
887 lbsr AbsLSN |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
888 pshs a |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
889 tfr b,a |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
890 clrb |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
891 tfr d,u |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
892 puls b |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
893 clra |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
894 tfr d,x |
912 | 895 lda <devpath |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
896 os9 I$Seek |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
897 lbcs WriteErr |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
898 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
|
899 |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
900 clra |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
901 clrb |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
902 tfr d,x |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
903 tfr d,u |
912 | 904 lda <devpath |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
905 os9 I$Seek |
912 | 906 leax <lsn0,u |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
907 ldy #DD.DAT |
912 | 908 lda <devpath |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
909 os9 I$Write |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
910 bcs Bye |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
911 rts |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
912 |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
913 * 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
|
914 WriteErr leax >ErrWrit,pcr |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
915 bra WritExit |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
916 BadName ldb #E$BPNam |
921
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
917 ShowHelp equ * |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
918 IFNE DOHELP |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
919 leax >HelpMsg,pcr |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
920 ELSE |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
921 clrb |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
922 bra Bye |
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
912
diff
changeset
|
923 ENDC |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
924 WritExit pshs b |
0 | 925 lda #$02 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
926 ldy #256 |
0 | 927 os9 I$WritLn |
928 puls b | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
929 Bye os9 F$Exit |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
930 |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
931 * Source/Destination Disk Switch Routine |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
932 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
|
933 clra |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
934 bra TstSingl |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
935 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
|
936 lda #$01 |
912 | 937 TstSingl tst <sngldrv |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
938 beq L06FD |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
939 AskUser pshs a |
1213
4e235f213651
Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents:
1166
diff
changeset
|
940 AskUser2 tsta |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
941 bne Ask4Dst |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
942 Ask4Src leax >Source,pcr |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
943 ldy #SourceL |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
944 bra L06D4 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
945 Ask4Dst leax >Destin,pcr |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
946 ldy #DestinL |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
947 L06D4 bsr DoWrite |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
948 leax ,-s |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
949 ldy #$0001 |
1916 | 950 lda #$02 read from stderr |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
951 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
|
952 lda ,s+ |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
953 eora #'C |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
954 anda #$DF |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
955 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
|
956 leax >TheBell,pcr |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
957 ldy #$0001 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
958 bsr DoWrite else ring the error bell |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
959 bsr WriteCR |
1215 | 960 * BUG FIX: in certain cases, puls a was being done twice. |
961 lda ,s ++ | |
962 * puls a -- | |
963 bra AskUser2 ++ | |
964 * bne AskUser -- | |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
965 L06F9 bsr WriteCR |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
966 puls a |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
967 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
|
968 |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
969 DoWrite lda #$01 |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
970 os9 I$WritLn |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
971 rts |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
972 |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
973 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
|
974 lda #$01 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
975 leax >CarRet,pcr |
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
976 ldy #80 |
172
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
977 os9 I$WritLn |
1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
boisy
parents:
169
diff
changeset
|
978 puls pc,y,x,a |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
979 |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
980 ItsFragd leax >BootFrag,pcr |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
981 SoftExit ldb #$01 |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
982 bra WritExit |
1215 | 983 |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
984 WarnUser leax >TWarn,pcr |
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
985 bra SoftExit |
168
3a847d2b4492
Cobbler, OS9Gen and format are all hardware dependent.
roug
parents:
124
diff
changeset
|
986 |
912 | 987 IFGT Level-1 |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
988 L0724 leax >CantRel,pcr |
283
07d1ec67d1d2
Made extensive comment improvements, fixed minor bug related to wiping out
boisy
parents:
266
diff
changeset
|
989 lbra WritExit |
912 | 990 ENDC |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
991 |
0 | 992 emod |
993 eom equ * | |
266
03af31c2d39d
Migrated OS-9 Level Two version over to OS-9 Level One with modifications
boisy
parents:
262
diff
changeset
|
994 end |