| 150 | 8115+ | | ; |
|
151 | 8115+ | | PunchBlock: | ; | |
|
152 | 8115+ | 0614766 | | lod | W6646 | | | | ;=<00 0:77 8191> |
|
153 | 8116 | 0677655 | | lns | W8109 | | | | ;mask end address in store, load start address | @8116
|
154 | 8116+ | 1220024 | | srl | 20 | | | | ;shift start address down |
|
155 | 8117 | 0337655 | | o15 | W8109 | | | | ;swap, subtract end from start | @8117
|
156 | 8117+ | 0417652 | | sto | W8106 | | | | ;store negated word count |
|
157 | 8118 | | .2: | ; | |
|
158 | 8118 | 2277266577777 | | inc | W8109 | / | lod | -1 | ;load next word | @8118
|
159 | 8119 | 0517653 | | ads | W8107 | | | | ;add to checksum | @8119
|
160 | 8119+ | | .3: | ; | |
|
161 | 8119+ | 1200043 | | sra | 35 | | | | ;shift into AR |
|
162 | 8120 | 0117647 | | add | W8103 | | | | ;add top bit to force oflo... | @8120
|
163 | 8120+ | | | clo | | | | | ;when word complete, clear oflo |
|
163+1 | 8120+ | 1077671 | | jo | .1 | | | | |
|
163+2 | 8121 | | .1: | ; | |
|
164 | 8121 | | .4: | ; | |
|
165 | 8121 | 0417656 | | sto | W8110 | | | | ;save word | @8121
|
166 | 8121+ | 0077675 | | and | .mask31 | | | | ;=31 |
|
167 | 8122 | 1077273700000 | | exa | W8110 | / | otp | 0 | ;output 1 byte, reload word | @8122
|
168 | 8123 | 1177674 | | jo | .5 | | | | ;word done | @8123
|
169 | 8123+ | 1300005 | | sla | 5 | | | | ;shift next byte out of AR |
|
170 | 8124 | 1017671 | | jmp | .4 | | | | ;and punch that | @8124
|
171 | 8124+ | | ; |
|
172 | 8124+ | | .5: | ; | |
|
173 | 8124+ | 0657652 | | lis | W8106 | | | | ;word done, bump count |
|
174 | 8125 | | .mask31: | ; | |
|
175 | 8125 | 1037666 | | jn | .2 | | | | ;still <0, repeat | @8125
|
176 | 8125+ | 0000037 | | 00 | +31 | | | | ; |
|
177 | 8126 | | .6: | ; | |
|
178 | 8126 | 0077277000001 | | 00 | W8111 | / | jmp | 1 | ; | @8126
|
179 | 8127 | | ; |
|
180 | 8127 | | ;-------------------------------------------------------------------- |
|
181 | 8127 | | DumpSub:: | ; | |
|
182 | 8127 | | .ret: | ; | |
|
183 | 8127 | 0077573000001 | | o00 | W8158 | / | jmp | 1 | ; | @8127
|
184 | 8128 | | ;-------------------------------------------------------------------- |
|
185 | 8128 | | ; DumpSub: parameter (in Acc): < xx y : ww z > where |
|
186 | 8128 | | ; xx is a function code: |
|
187 | 8128 | | ; 40 - output bootstrap then block of data |
|
188 | 8128 | | ; 20 - output further block of data |
|
189 | 8128 | | ; 10 - output bottstrap trigger |
|
190 | 8128 | | ; y & z are start and end of block to be punched (40/20) |
|
191 | 8128 | | ; ww & z are trigger instruction (10) |
|
192 | 8128 | | ; |
|
193 | 8128 | | DumpSub: | ; | |
|
194 | 8128 | 0000000 | | o00 | 0 | | | | ; | @8128
|
195 | 8128+ | 0557652 | | cls | W8106 | | | | ; |
|
196 | 8129 | | .1: | ; | |
|
197 | 8129 | 0000000 | | o00 | 0 | | | | ; | @8129
|
198 | 8129+ | 0417654 | | sto | W8108 | | | | ; |
|
199 | 8130 | 0077646 | | and | W8102 | | | | ;=07700000000000 | @8130
|
200 | 8130+ | 1057701 | | jz | .1 | | | | ;loop stop? |
|
201 | 8131 | 0557653 | | cls | W8107 | | | | ; | @8131
|
202 | 8131+ | 0577654 | | o27 | W8108 | | | | ; |
|
203 | 8132 | | .2: | ; | |
|
204 | 8132 | 1037706 | | jn | .3 | | | | ;convert bit to int | @8132
|
205 | 8132+ | 1320001 | | sll | 1 | | | | ; 40 = 0, 20 = 1, 10 = 2, 04 = 3 |
|
206 | 8133 | 0457653 | | inc | W8107 | | | | ; | @8133
|
207 | 8133+ | 1017704 | | jmp | .2 | | | | ; |
|
208 | 8134 | | ; |
|
209 | 8134 | | .3: | ; | |
|
210 | 8134 | 0140000 | | cla | 0 | | | | ; | @8134
|
211 | 8134+ | 0017777 | | o00 | +8191 | | | | ;in-line constant |
|
212 | 8135 | 0077257157710 | | o00 | W8107 | / | jz | .SW | ;switch on | @8135
|
213 | 8136 | 1017706 | | jmp | .3 | | | | ;loop stop? | @8136
|
214 | 8136+ | | ; |
|
215 | 8136+ | | .SW: | ; | |
|
216 | 8136+ | | ; entry 40: |
|
217 | 8136+ | 0617643 | | lod | W8099 | | | | ;+0 =99 |
|
218 | 8137 | 1117717 | | jmp | .sw0 | | | | ; | @8137
|
219 | 8137+ | | ; entry 20: |
|
220 | 8137+ | 0617650 | | lod | W8104 | | | | ;+1 |
|
221 | 8138 | 1117714 | | jmp | .sw1 | | | | ; | @8138
|
222 | 8138+ | | ; entry 10: |
|
223 | 8138+ | 0617651 | | lod | L8105 | | | | ;+2 |
|
224 | 8139 | 1017714 | | jmp | .sw2 | | | | ; | @8139
|
225 | 8139+ | | ; entry 04: |
|
226 | 8139+ | 0617654 | | lod | W8108 | | | | ;+3 |
|
227 | 8140 | | .sw2: | ; output bootstrap trigger | |
|
228 | 8140 | 0557653 | | cls | W8107 | | | | ;reset flag | @8140
|
229 | 8140+ | | .sw1: | ; output block of data | |
|
230 | 8140+ | 0417656 | | sto | W8110 | | | | ;store address |
|
231 | 8141 | | | calln | , | | | | ; punch address first | @8141
|
231+1 | 8141 | 7377275017660 | | lnk | W8111 | : | jmp | PunchAddr | |
|
232 | 8142 | 0617653 | | lod | W8107 | | | | ;trigger flag? | @8142
|
233 | 8142+ | 1057677 | | jz | .ret | | | | ;return +1 |
|
234 | 8143 | 1017727 | | jmp | .5 | | | | ;now do block of data | @8143
|
235 | 8143+ | | ; |
|
236 | 8143+ | | .sw0: | ; | |
|
237 | 8143+ | 0437652 | | stn | W8106 | | | | ; |
|
238 | 8144 | | .4: | ; | |
|
239 | 8144 | 1700000 | | otp | 0 | | | | ;punch 100 blanks | @8144
|
240 | 8144+ | 0657652 | | lis | W8106 | | | | ; |
|
241 | 8145 | 1037720 | | jn | .4 | | | | ;repeat loop | @8145
|
242 | 8145+ | 0617644 | | lod | W8100 | | | | ;trigger into bootstrap |
|
243 | 8146 | 0000000 | | o00 | 0 | | | | ; | @8146
|
244 | 8146+ | 0077706 | | and | .3 | | | | ;=8191 mask out trigger address |
|
245 | 8147 | 0354731 | | stc | W6617 | | | | ;save trigger address, zero acc | @8147
|
246 | 8147+ | 0214771 | | exa | W6649 | | | | ;no other refs! |
|
247 | 8148 | 0554770 | | cls | W6648 | | | | ;??? other ref also cls | @8148
|
248 | 8148+ | 0554752 | | cls | W6634 | | | | ;word in middle of bootstrap code |
|
249 | 8149 | 0617645 | | lod | W8101 | | | | ;=<00 BootStart:00 BootEnd> | @8149
|
250 | 8149+ | 0417655 | | sto | W8109 | | | | ;store block address |
|
251 | 8150 | | | calln | , | | | | ;punch out bootstrap | @8150
|
251+1 | 8150 | 7377275117663 | | lnk | W8111 | : | jmp | PunchBlock | |
|
252 | 8151 | | ; |
|
253 | 8151 | | ; bootstrap now punched, follow up with block of code |
|
254 | 8151 | | ; |
|
255 | 8151 | | .5: | ; | |
|
256 | 8151 | 0617654 | | lod | W8108 | | | | ; | @8151
|
257 | 8151+ | 0417656 | | sto | W8110 | | | | ;boot load address |
|
258 | 8152 | 0417653 | | sto | W8107 | | | | ;clear sumcheck | @8152
|
259 | 8152+ | 0417655 | | sto | W8109 | | | | ;store block address |
|
260 | 8153 | | | calln | , | | | | ;output load address | @8153
|
260+1 | 8153 | 7377275017660 | | lnk | W8111 | : | jmp | PunchAddr | |
|
261 | 8154 | | | calln | , | | | | ;and data block | @8154
|
261+1 | 8154 | 7377275117663 | | lnk | W8111 | : | jmp | PunchBlock | |
|
262 | 8155 | 0617653 | | lod | W8107 | | | | ; | @8155
|
263 | 8155+ | 0000000 | | o00 | 0 | | | | ; |
|
264 | 8156 | | | calln | , | | | | ;output sumcheck | @8156
|
264+1 | 8156 | 7377275117667 | | lnk | W8111 | : | jmp | DumpPunch.3 | |
|
265 | 8157 | 1017677 | L8157: | jmp | .ret | | | | ;return +1 | @8157
|
266 | 8157+ | | ; |
|
267 | 8157+ | 0000000 | | o00 | 0 | | | | ; |
|
268 | 8158 | 0000000000000 | W8158: | +0 | ; | @8158
|
269 | 8159 | | ; |
|
270 | 8159 | | ; symbols used by bootstrap |
|
271 | 8159 | | ; |
|
272 | 8159 | | =8188 | |
|
273 | 8188 | 0000000000000 | W8188: | +0 | ; = 8188 |
|
274 | 8189 | 0000000000000 | W8189: | +0 | ; = 8189 |
|
275 | 8190 | 0000000000000 | W8190: | +0 | ; = 8190 |
|
276 | 8191 | 0000000000000 | W8191: | +0 | ; = 8191 |
|
277 | 8192 | | ; |
|