Mercurial > hg > Members > kono > nitros9-code
comparison level1/cmds/cobbler_d64.asm @ 172:1cd7548b534f
Moved dragon64 specific commands to have _d64 as part of name, CoCo commands
are just command name
author | boisy |
---|---|
date | Thu, 11 Jul 2002 21:34:55 +0000 |
parents | |
children | e9ce43cc215e |
comparison
equal
deleted
inserted
replaced
171:e2a68a0ff6f5 | 172:1cd7548b534f |
---|---|
1 ******************************************************************** | |
2 * Cobbler - Make a bootstrap file | |
3 * | |
4 * $Id$ | |
5 * | |
6 * Ed. Comments Who YY/MM/DD | |
7 * ------------------------------------------------------------------ | |
8 * 5 Original Dragon Data distribution version | |
9 | |
10 nam Cobbler | |
11 ttl Make a bootstrap file | |
12 | |
13 * Disassembled 02/04/03 23:11:02 by Disasm v1.6 (C) 1988 by RML | |
14 | |
15 ifp1 | |
16 use defsfile | |
17 endc | |
18 tylg set Prgrm+Objct | |
19 atrv set ReEnt+rev | |
20 rev set $01 | |
21 mod eom,name,tylg,atrv,start,size | |
22 u0000 rmb 1 | |
23 DevFd rmb 3 | |
24 BTLSN rmb 1 | |
25 u0005 rmb 2 | |
26 BtSiz rmb 2 | |
27 sttbuf rmb 20 | |
28 u001D rmb 2 | |
29 u001F rmb 10 | |
30 u0029 rmb 2 | |
31 devnam rmb 32 | |
32 u004B rmb 16 | |
33 u005B rmb 1 | |
34 u005C rmb 7 | |
35 u0063 rmb 682 | |
36 size equ . | |
37 name equ * | |
38 fcs /Cobbler/ | |
39 fcb $05 | |
40 L0015 fcb C$LF | |
41 fcc "Use: Cobbler </devname>" | |
42 fcb C$LF | |
43 fcc " to create a new system disk" | |
44 fcb C$CR | |
45 L004E fcb C$LF | |
46 fcc "Error writing kernel track" | |
47 fcb C$CR | |
48 L006A fcb C$LF | |
49 fcc "Warning - Kernel track has" | |
50 fcb C$LF | |
51 fcc "not been allocated properly." | |
52 fcb C$LF | |
53 fcc "Track not written." | |
54 fcb C$CR | |
55 L00B6 fcb C$LF | |
56 fcc "Error - OS9boot file fragmented" | |
57 fcb C$LF | |
58 fcc " This disk will not bootstrap." | |
59 fcb C$CR | |
60 BfNam fcc "OS9Boot " | |
61 fcb $FF | |
62 start equ * | |
63 clrb | |
64 lda #'/ | |
65 cmpa ,x | |
66 lbne Usage | |
67 os9 F$PrsNam | |
68 lbcs Usage | |
69 lda #'/ | |
70 cmpa ,y | |
71 lbeq Usage | |
72 leay <devnam,u | |
73 L011A sta ,y+ | |
74 lda ,x+ | |
75 decb | |
76 bpl L011A | |
77 sty <u0029 | |
78 lda #'@ | |
79 ldb #$20 | |
80 std ,y++ | |
81 leax <devnam,u | |
82 lda #UPDAT. | |
83 os9 I$Open | |
84 sta <DevFd | |
85 lbcs Usage | |
86 ldx <u0029 | |
87 leay >BfNam,pcr | |
88 lda #'/ | |
89 L0140 sta ,x+ | |
90 lda ,y+ | |
91 bpl L0140 | |
92 lda <DevFd | |
93 pshs u | |
94 ldx #$0000 | |
95 ldu #$0015 probably DD.BT | |
96 os9 I$Seek | |
97 puls u | |
98 lbcs Exit | |
99 leax BTLSN,u | |
100 ldy #$0005 | |
101 os9 I$Read Read bootstrap sector + size = 5 bytes | |
102 lbcs Exit | |
103 ldd <BtSiz | |
104 beq L017B | |
105 leax <devnam,u | |
106 os9 I$Delete | |
107 clra | |
108 clrb | |
109 sta <BTLSN | |
110 std <u0005 | |
111 std <BtSiz | |
112 lbsr UpLSN0 | |
113 L017B lda #WRITE. | |
114 ldb #UPDAT. | |
115 leax <devnam,u | |
116 os9 I$Create | |
117 sta <u0000 | |
118 lbcs Exit | |
119 ldd >$0068 | |
120 subd >$0066 | |
121 tfr d,y | |
122 std <BtSiz | |
123 ldx >$0066 | |
124 lda <u0000 | |
125 os9 I$Write | |
126 lbcs Exit | |
127 leax sttbuf,u | |
128 ldb #SS.OPT | |
129 os9 I$GetStt | |
130 lbcs Exit | |
131 lda <u0000 | |
132 os9 I$Close | |
133 lbcs Usage | |
134 pshs u | |
135 ldx <u001D,u | |
136 lda <u001F,u | |
137 clrb | |
138 tfr d,u | |
139 lda <DevFd | |
140 os9 I$Seek | |
141 puls u | |
142 lbcs Exit | |
143 leax <u004B,u | |
144 ldy #$0100 | |
145 os9 I$Read | |
146 lbcs Exit | |
147 ldd <u0063,u | |
148 lbne Fragd | |
149 ldb <u005B,u | |
150 stb <BTLSN | |
151 ldd <u005C,u | |
152 std <u0005 | |
153 lbsr UpLSN0 | |
154 lbsr SkLSN1 | |
155 leax <u004B,u | |
156 ldy #$0100 | |
157 os9 I$Read | |
158 bcs wrerr | |
159 lda ,x | |
160 anda #$3F | |
161 eora #$3F | |
162 bne NotAllo | |
163 lda $01,x | |
164 eora #$FF | |
165 bne NotAllo | |
166 lda $02,x | |
167 anda #$90 | |
168 eora #$90 | |
169 bne NotAllo | |
170 ldx #$F000 Address of kernel in RAM | |
171 ldy #$0F00 Amount to write | |
172 lda <DevFd | |
173 os9 I$Write | |
174 bcs ETrack | |
175 os9 I$Close | |
176 bcs Exit | |
177 clrb | |
178 bra Exit | |
179 | |
180 SkLSN1 pshs u | |
181 lda <DevFd | |
182 ldx #$0000 | |
183 ldu #$0100 | |
184 os9 I$Seek Seek to allocation map at LSN 1 | |
185 puls pc,u | |
186 | |
187 Usage leax >L0015,pcr | |
188 wrerr pshs b | |
189 lda #$02 | |
190 ldy #$0100 | |
191 os9 I$WritLn | |
192 comb | |
193 puls b | |
194 Exit os9 F$Exit | |
195 | |
196 Fragd leax >L00B6,pcr | |
197 clrb | |
198 bra wrerr | |
199 | |
200 ETrack leax >L004E,pcr | |
201 clrb | |
202 bra wrerr | |
203 * | |
204 * Write warning | |
205 NotAllo leax >L006A,pcr | |
206 clrb | |
207 bra wrerr | |
208 * | |
209 * Update the identification sector on LSN 0 | |
210 * | |
211 UpLSN0 pshs u | |
212 ldx #$0000 | |
213 ldu #$0015 probably DD.BT | |
214 lda <DevFd | |
215 os9 I$Seek | |
216 puls u | |
217 bcs Exit | |
218 leax BTLSN,u | |
219 ldy #$0005 | |
220 os9 I$Write | |
221 bcs Exit | |
222 rts | |
223 emod | |
224 eom equ * |