2 * sim710.scr - Copyright (C) 1999 Richard Hirst
5 /* Offsets from DSA, allow 128 elements of scatter/gather */
7 ABSOLUTE dsa_select = 0
8 ABSOLUTE dsa_msgout = 8
10 ABSOLUTE dsa_status = 24
11 ABSOLUTE dsa_msgin = 32
12 ABSOLUTE dsa_datain = 40 /* 8 * 128 = 1024 bytes */
13 ABSOLUTE dsa_dataout = 1064 /* 8 * 128 = 1024 bytes */
14 ABSOLUTE dsa_size = 2088
16 ABSOLUTE reselected_identify = 0
17 ABSOLUTE msgin_buf = 0
19 /* Interrupt values passed back to driver */
21 ABSOLUTE int_bad_extmsg1a = 0xab930000
22 ABSOLUTE int_bad_extmsg1b = 0xab930001
23 ABSOLUTE int_bad_extmsg2a = 0xab930002
24 ABSOLUTE int_bad_extmsg2b = 0xab930003
25 ABSOLUTE int_bad_extmsg3a = 0xab930004
26 ABSOLUTE int_bad_extmsg3b = 0xab930005
27 ABSOLUTE int_bad_msg1 = 0xab930006
28 ABSOLUTE int_bad_msg2 = 0xab930007
29 ABSOLUTE int_bad_msg3 = 0xab930008
30 ABSOLUTE int_cmd_bad_phase = 0xab930009
31 ABSOLUTE int_cmd_complete = 0xab93000a
32 ABSOLUTE int_data_bad_phase = 0xab93000b
33 ABSOLUTE int_msg_sdtr1 = 0xab93000c
34 ABSOLUTE int_msg_sdtr2 = 0xab93000d
35 ABSOLUTE int_msg_sdtr3 = 0xab93000e
36 ABSOLUTE int_no_msgout1 = 0xab93000f
37 ABSOLUTE int_no_msgout2 = 0xab930010
38 ABSOLUTE int_no_msgout3 = 0xab930011
39 ABSOLUTE int_not_cmd_complete = 0xab930012
40 ABSOLUTE int_sel_no_ident = 0xab930013
41 ABSOLUTE int_sel_not_cmd = 0xab930014
42 ABSOLUTE int_status_not_msgin = 0xab930015
43 ABSOLUTE int_resel_not_msgin = 0xab930016
44 ABSOLUTE int_reselected = 0xab930017
45 ABSOLUTE int_selected = 0xab930018
46 ABSOLUTE int_disc1 = 0xab930019
47 ABSOLUTE int_disc2 = 0xab93001a
48 ABSOLUTE int_disc3 = 0xab93001b
49 ABSOLUTE int_not_rej = 0xab93001c
52 /* Bit field settings used to record status in SCRATCH */
54 ABSOLUTE had_select = 0x01
55 ABSOLUTE had_msgout = 0x02
56 ABSOLUTE had_cmdout = 0x04
57 ABSOLUTE had_datain = 0x08
58 ABSOLUTE had_dataout = 0x10
59 ABSOLUTE had_status = 0x20
60 ABSOLUTE had_msgin = 0x40
61 ABSOLUTE had_extmsg = 0x80
64 /* These scripts are heavily based on the examples in the NCR 53C710
65 * Programmer's Guide (Preliminary).
71 MOVE SCRATCH0 & 0 TO SCRATCH0
72 ; Enable selection timer
73 MOVE CTEST7 & 0xef TO CTEST7
74 SELECT ATN FROM dsa_select, reselect
75 JUMP get_status, WHEN STATUS
76 ; Disable selection timer
77 MOVE CTEST7 | 0x10 TO CTEST7
78 MOVE SCRATCH0 | had_select TO SCRATCH0
79 INT int_sel_no_ident, IF NOT MSG_OUT
80 MOVE SCRATCH0 | had_msgout TO SCRATCH0
81 MOVE FROM dsa_msgout, when MSG_OUT
84 JUMP get_status, IF STATUS
86 JUMP get_msgin1, WHEN MSG_IN
87 INT int_sel_not_cmd, IF NOT CMD
90 MOVE SCRATCH0 | had_cmdout TO SCRATCH0
91 MOVE FROM dsa_cmnd, WHEN CMD
95 JUMP get_msgin2, WHEN MSG_IN
96 JUMP get_status, IF STATUS
97 JUMP input_data, IF DATA_IN
98 JUMP output_data, IF DATA_OUT
102 ; Disable selection timer
103 MOVE CTEST7 | 0x10 TO CTEST7
104 MOVE FROM dsa_status, WHEN STATUS
105 INT int_status_not_msgin, WHEN NOT MSG_IN
106 MOVE FROM dsa_msgin, WHEN MSG_IN
107 INT int_not_cmd_complete, IF NOT 0x00
109 ENTRY wait_disc_complete
115 MOVE SCRATCH0 | had_datain TO SCRATCH0
116 ENTRY patch_input_data
119 MOVE FROM dsa_datain+0x0000, WHEN DATA_IN
120 MOVE FROM dsa_datain+0x0008, WHEN DATA_IN
121 MOVE FROM dsa_datain+0x0010, WHEN DATA_IN
122 MOVE FROM dsa_datain+0x0018, WHEN DATA_IN
123 MOVE FROM dsa_datain+0x0020, WHEN DATA_IN
124 MOVE FROM dsa_datain+0x0028, WHEN DATA_IN
125 MOVE FROM dsa_datain+0x0030, WHEN DATA_IN
126 MOVE FROM dsa_datain+0x0038, WHEN DATA_IN
127 MOVE FROM dsa_datain+0x0040, WHEN DATA_IN
128 MOVE FROM dsa_datain+0x0048, WHEN DATA_IN
129 MOVE FROM dsa_datain+0x0050, WHEN DATA_IN
130 MOVE FROM dsa_datain+0x0058, WHEN DATA_IN
131 MOVE FROM dsa_datain+0x0060, WHEN DATA_IN
132 MOVE FROM dsa_datain+0x0068, WHEN DATA_IN
133 MOVE FROM dsa_datain+0x0070, WHEN DATA_IN
134 MOVE FROM dsa_datain+0x0078, WHEN DATA_IN
135 MOVE FROM dsa_datain+0x0080, WHEN DATA_IN
136 MOVE FROM dsa_datain+0x0088, WHEN DATA_IN
137 MOVE FROM dsa_datain+0x0090, WHEN DATA_IN
138 MOVE FROM dsa_datain+0x0098, WHEN DATA_IN
139 MOVE FROM dsa_datain+0x00a0, WHEN DATA_IN
140 MOVE FROM dsa_datain+0x00a8, WHEN DATA_IN
141 MOVE FROM dsa_datain+0x00b0, WHEN DATA_IN
142 MOVE FROM dsa_datain+0x00b8, WHEN DATA_IN
143 MOVE FROM dsa_datain+0x00c0, WHEN DATA_IN
144 MOVE FROM dsa_datain+0x00c8, WHEN DATA_IN
145 MOVE FROM dsa_datain+0x00d0, WHEN DATA_IN
146 MOVE FROM dsa_datain+0x00d8, WHEN DATA_IN
147 MOVE FROM dsa_datain+0x00e0, WHEN DATA_IN
148 MOVE FROM dsa_datain+0x00e8, WHEN DATA_IN
149 MOVE FROM dsa_datain+0x00f0, WHEN DATA_IN
150 MOVE FROM dsa_datain+0x00f8, WHEN DATA_IN
151 MOVE FROM dsa_datain+0x0100, WHEN DATA_IN
152 MOVE FROM dsa_datain+0x0108, WHEN DATA_IN
153 MOVE FROM dsa_datain+0x0110, WHEN DATA_IN
154 MOVE FROM dsa_datain+0x0118, WHEN DATA_IN
155 MOVE FROM dsa_datain+0x0120, WHEN DATA_IN
156 MOVE FROM dsa_datain+0x0128, WHEN DATA_IN
157 MOVE FROM dsa_datain+0x0130, WHEN DATA_IN
158 MOVE FROM dsa_datain+0x0138, WHEN DATA_IN
159 MOVE FROM dsa_datain+0x0140, WHEN DATA_IN
160 MOVE FROM dsa_datain+0x0148, WHEN DATA_IN
161 MOVE FROM dsa_datain+0x0150, WHEN DATA_IN
162 MOVE FROM dsa_datain+0x0158, WHEN DATA_IN
163 MOVE FROM dsa_datain+0x0160, WHEN DATA_IN
164 MOVE FROM dsa_datain+0x0168, WHEN DATA_IN
165 MOVE FROM dsa_datain+0x0170, WHEN DATA_IN
166 MOVE FROM dsa_datain+0x0178, WHEN DATA_IN
167 MOVE FROM dsa_datain+0x0180, WHEN DATA_IN
168 MOVE FROM dsa_datain+0x0188, WHEN DATA_IN
169 MOVE FROM dsa_datain+0x0190, WHEN DATA_IN
170 MOVE FROM dsa_datain+0x0198, WHEN DATA_IN
171 MOVE FROM dsa_datain+0x01a0, WHEN DATA_IN
172 MOVE FROM dsa_datain+0x01a8, WHEN DATA_IN
173 MOVE FROM dsa_datain+0x01b0, WHEN DATA_IN
174 MOVE FROM dsa_datain+0x01b8, WHEN DATA_IN
175 MOVE FROM dsa_datain+0x01c0, WHEN DATA_IN
176 MOVE FROM dsa_datain+0x01c8, WHEN DATA_IN
177 MOVE FROM dsa_datain+0x01d0, WHEN DATA_IN
178 MOVE FROM dsa_datain+0x01d8, WHEN DATA_IN
179 MOVE FROM dsa_datain+0x01e0, WHEN DATA_IN
180 MOVE FROM dsa_datain+0x01e8, WHEN DATA_IN
181 MOVE FROM dsa_datain+0x01f0, WHEN DATA_IN
182 MOVE FROM dsa_datain+0x01f8, WHEN DATA_IN
183 MOVE FROM dsa_datain+0x0200, WHEN DATA_IN
184 MOVE FROM dsa_datain+0x0208, WHEN DATA_IN
185 MOVE FROM dsa_datain+0x0210, WHEN DATA_IN
186 MOVE FROM dsa_datain+0x0218, WHEN DATA_IN
187 MOVE FROM dsa_datain+0x0220, WHEN DATA_IN
188 MOVE FROM dsa_datain+0x0228, WHEN DATA_IN
189 MOVE FROM dsa_datain+0x0230, WHEN DATA_IN
190 MOVE FROM dsa_datain+0x0238, WHEN DATA_IN
191 MOVE FROM dsa_datain+0x0240, WHEN DATA_IN
192 MOVE FROM dsa_datain+0x0248, WHEN DATA_IN
193 MOVE FROM dsa_datain+0x0250, WHEN DATA_IN
194 MOVE FROM dsa_datain+0x0258, WHEN DATA_IN
195 MOVE FROM dsa_datain+0x0260, WHEN DATA_IN
196 MOVE FROM dsa_datain+0x0268, WHEN DATA_IN
197 MOVE FROM dsa_datain+0x0270, WHEN DATA_IN
198 MOVE FROM dsa_datain+0x0278, WHEN DATA_IN
199 MOVE FROM dsa_datain+0x0280, WHEN DATA_IN
200 MOVE FROM dsa_datain+0x0288, WHEN DATA_IN
201 MOVE FROM dsa_datain+0x0290, WHEN DATA_IN
202 MOVE FROM dsa_datain+0x0298, WHEN DATA_IN
203 MOVE FROM dsa_datain+0x02a0, WHEN DATA_IN
204 MOVE FROM dsa_datain+0x02a8, WHEN DATA_IN
205 MOVE FROM dsa_datain+0x02b0, WHEN DATA_IN
206 MOVE FROM dsa_datain+0x02b8, WHEN DATA_IN
207 MOVE FROM dsa_datain+0x02c0, WHEN DATA_IN
208 MOVE FROM dsa_datain+0x02c8, WHEN DATA_IN
209 MOVE FROM dsa_datain+0x02d0, WHEN DATA_IN
210 MOVE FROM dsa_datain+0x02d8, WHEN DATA_IN
211 MOVE FROM dsa_datain+0x02e0, WHEN DATA_IN
212 MOVE FROM dsa_datain+0x02e8, WHEN DATA_IN
213 MOVE FROM dsa_datain+0x02f0, WHEN DATA_IN
214 MOVE FROM dsa_datain+0x02f8, WHEN DATA_IN
215 MOVE FROM dsa_datain+0x0300, WHEN DATA_IN
216 MOVE FROM dsa_datain+0x0308, WHEN DATA_IN
217 MOVE FROM dsa_datain+0x0310, WHEN DATA_IN
218 MOVE FROM dsa_datain+0x0318, WHEN DATA_IN
219 MOVE FROM dsa_datain+0x0320, WHEN DATA_IN
220 MOVE FROM dsa_datain+0x0328, WHEN DATA_IN
221 MOVE FROM dsa_datain+0x0330, WHEN DATA_IN
222 MOVE FROM dsa_datain+0x0338, WHEN DATA_IN
223 MOVE FROM dsa_datain+0x0340, WHEN DATA_IN
224 MOVE FROM dsa_datain+0x0348, WHEN DATA_IN
225 MOVE FROM dsa_datain+0x0350, WHEN DATA_IN
226 MOVE FROM dsa_datain+0x0358, WHEN DATA_IN
227 MOVE FROM dsa_datain+0x0360, WHEN DATA_IN
228 MOVE FROM dsa_datain+0x0368, WHEN DATA_IN
229 MOVE FROM dsa_datain+0x0370, WHEN DATA_IN
230 MOVE FROM dsa_datain+0x0378, WHEN DATA_IN
231 MOVE FROM dsa_datain+0x0380, WHEN DATA_IN
232 MOVE FROM dsa_datain+0x0388, WHEN DATA_IN
233 MOVE FROM dsa_datain+0x0390, WHEN DATA_IN
234 MOVE FROM dsa_datain+0x0398, WHEN DATA_IN
235 MOVE FROM dsa_datain+0x03a0, WHEN DATA_IN
236 MOVE FROM dsa_datain+0x03a8, WHEN DATA_IN
237 MOVE FROM dsa_datain+0x03b0, WHEN DATA_IN
238 MOVE FROM dsa_datain+0x03b8, WHEN DATA_IN
239 MOVE FROM dsa_datain+0x03c0, WHEN DATA_IN
240 MOVE FROM dsa_datain+0x03c8, WHEN DATA_IN
241 MOVE FROM dsa_datain+0x03d0, WHEN DATA_IN
242 MOVE FROM dsa_datain+0x03d8, WHEN DATA_IN
243 MOVE FROM dsa_datain+0x03e0, WHEN DATA_IN
244 MOVE FROM dsa_datain+0x03e8, WHEN DATA_IN
245 MOVE FROM dsa_datain+0x03f0, WHEN DATA_IN
246 MOVE FROM dsa_datain+0x03f8, WHEN DATA_IN
250 MOVE SCRATCH0 | had_dataout TO SCRATCH0
251 ENTRY patch_output_data
254 MOVE FROM dsa_dataout+0x0000, WHEN DATA_OUT
255 MOVE FROM dsa_dataout+0x0008, WHEN DATA_OUT
256 MOVE FROM dsa_dataout+0x0010, WHEN DATA_OUT
257 MOVE FROM dsa_dataout+0x0018, WHEN DATA_OUT
258 MOVE FROM dsa_dataout+0x0020, WHEN DATA_OUT
259 MOVE FROM dsa_dataout+0x0028, WHEN DATA_OUT
260 MOVE FROM dsa_dataout+0x0030, WHEN DATA_OUT
261 MOVE FROM dsa_dataout+0x0038, WHEN DATA_OUT
262 MOVE FROM dsa_dataout+0x0040, WHEN DATA_OUT
263 MOVE FROM dsa_dataout+0x0048, WHEN DATA_OUT
264 MOVE FROM dsa_dataout+0x0050, WHEN DATA_OUT
265 MOVE FROM dsa_dataout+0x0058, WHEN DATA_OUT
266 MOVE FROM dsa_dataout+0x0060, WHEN DATA_OUT
267 MOVE FROM dsa_dataout+0x0068, WHEN DATA_OUT
268 MOVE FROM dsa_dataout+0x0070, WHEN DATA_OUT
269 MOVE FROM dsa_dataout+0x0078, WHEN DATA_OUT
270 MOVE FROM dsa_dataout+0x0080, WHEN DATA_OUT
271 MOVE FROM dsa_dataout+0x0088, WHEN DATA_OUT
272 MOVE FROM dsa_dataout+0x0090, WHEN DATA_OUT
273 MOVE FROM dsa_dataout+0x0098, WHEN DATA_OUT
274 MOVE FROM dsa_dataout+0x00a0, WHEN DATA_OUT
275 MOVE FROM dsa_dataout+0x00a8, WHEN DATA_OUT
276 MOVE FROM dsa_dataout+0x00b0, WHEN DATA_OUT
277 MOVE FROM dsa_dataout+0x00b8, WHEN DATA_OUT
278 MOVE FROM dsa_dataout+0x00c0, WHEN DATA_OUT
279 MOVE FROM dsa_dataout+0x00c8, WHEN DATA_OUT
280 MOVE FROM dsa_dataout+0x00d0, WHEN DATA_OUT
281 MOVE FROM dsa_dataout+0x00d8, WHEN DATA_OUT
282 MOVE FROM dsa_dataout+0x00e0, WHEN DATA_OUT
283 MOVE FROM dsa_dataout+0x00e8, WHEN DATA_OUT
284 MOVE FROM dsa_dataout+0x00f0, WHEN DATA_OUT
285 MOVE FROM dsa_dataout+0x00f8, WHEN DATA_OUT
286 MOVE FROM dsa_dataout+0x0100, WHEN DATA_OUT
287 MOVE FROM dsa_dataout+0x0108, WHEN DATA_OUT
288 MOVE FROM dsa_dataout+0x0110, WHEN DATA_OUT
289 MOVE FROM dsa_dataout+0x0118, WHEN DATA_OUT
290 MOVE FROM dsa_dataout+0x0120, WHEN DATA_OUT
291 MOVE FROM dsa_dataout+0x0128, WHEN DATA_OUT
292 MOVE FROM dsa_dataout+0x0130, WHEN DATA_OUT
293 MOVE FROM dsa_dataout+0x0138, WHEN DATA_OUT
294 MOVE FROM dsa_dataout+0x0140, WHEN DATA_OUT
295 MOVE FROM dsa_dataout+0x0148, WHEN DATA_OUT
296 MOVE FROM dsa_dataout+0x0150, WHEN DATA_OUT
297 MOVE FROM dsa_dataout+0x0158, WHEN DATA_OUT
298 MOVE FROM dsa_dataout+0x0160, WHEN DATA_OUT
299 MOVE FROM dsa_dataout+0x0168, WHEN DATA_OUT
300 MOVE FROM dsa_dataout+0x0170, WHEN DATA_OUT
301 MOVE FROM dsa_dataout+0x0178, WHEN DATA_OUT
302 MOVE FROM dsa_dataout+0x0180, WHEN DATA_OUT
303 MOVE FROM dsa_dataout+0x0188, WHEN DATA_OUT
304 MOVE FROM dsa_dataout+0x0190, WHEN DATA_OUT
305 MOVE FROM dsa_dataout+0x0198, WHEN DATA_OUT
306 MOVE FROM dsa_dataout+0x01a0, WHEN DATA_OUT
307 MOVE FROM dsa_dataout+0x01a8, WHEN DATA_OUT
308 MOVE FROM dsa_dataout+0x01b0, WHEN DATA_OUT
309 MOVE FROM dsa_dataout+0x01b8, WHEN DATA_OUT
310 MOVE FROM dsa_dataout+0x01c0, WHEN DATA_OUT
311 MOVE FROM dsa_dataout+0x01c8, WHEN DATA_OUT
312 MOVE FROM dsa_dataout+0x01d0, WHEN DATA_OUT
313 MOVE FROM dsa_dataout+0x01d8, WHEN DATA_OUT
314 MOVE FROM dsa_dataout+0x01e0, WHEN DATA_OUT
315 MOVE FROM dsa_dataout+0x01e8, WHEN DATA_OUT
316 MOVE FROM dsa_dataout+0x01f0, WHEN DATA_OUT
317 MOVE FROM dsa_dataout+0x01f8, WHEN DATA_OUT
318 MOVE FROM dsa_dataout+0x0200, WHEN DATA_OUT
319 MOVE FROM dsa_dataout+0x0208, WHEN DATA_OUT
320 MOVE FROM dsa_dataout+0x0210, WHEN DATA_OUT
321 MOVE FROM dsa_dataout+0x0218, WHEN DATA_OUT
322 MOVE FROM dsa_dataout+0x0220, WHEN DATA_OUT
323 MOVE FROM dsa_dataout+0x0228, WHEN DATA_OUT
324 MOVE FROM dsa_dataout+0x0230, WHEN DATA_OUT
325 MOVE FROM dsa_dataout+0x0238, WHEN DATA_OUT
326 MOVE FROM dsa_dataout+0x0240, WHEN DATA_OUT
327 MOVE FROM dsa_dataout+0x0248, WHEN DATA_OUT
328 MOVE FROM dsa_dataout+0x0250, WHEN DATA_OUT
329 MOVE FROM dsa_dataout+0x0258, WHEN DATA_OUT
330 MOVE FROM dsa_dataout+0x0260, WHEN DATA_OUT
331 MOVE FROM dsa_dataout+0x0268, WHEN DATA_OUT
332 MOVE FROM dsa_dataout+0x0270, WHEN DATA_OUT
333 MOVE FROM dsa_dataout+0x0278, WHEN DATA_OUT
334 MOVE FROM dsa_dataout+0x0280, WHEN DATA_OUT
335 MOVE FROM dsa_dataout+0x0288, WHEN DATA_OUT
336 MOVE FROM dsa_dataout+0x0290, WHEN DATA_OUT
337 MOVE FROM dsa_dataout+0x0298, WHEN DATA_OUT
338 MOVE FROM dsa_dataout+0x02a0, WHEN DATA_OUT
339 MOVE FROM dsa_dataout+0x02a8, WHEN DATA_OUT
340 MOVE FROM dsa_dataout+0x02b0, WHEN DATA_OUT
341 MOVE FROM dsa_dataout+0x02b8, WHEN DATA_OUT
342 MOVE FROM dsa_dataout+0x02c0, WHEN DATA_OUT
343 MOVE FROM dsa_dataout+0x02c8, WHEN DATA_OUT
344 MOVE FROM dsa_dataout+0x02d0, WHEN DATA_OUT
345 MOVE FROM dsa_dataout+0x02d8, WHEN DATA_OUT
346 MOVE FROM dsa_dataout+0x02e0, WHEN DATA_OUT
347 MOVE FROM dsa_dataout+0x02e8, WHEN DATA_OUT
348 MOVE FROM dsa_dataout+0x02f0, WHEN DATA_OUT
349 MOVE FROM dsa_dataout+0x02f8, WHEN DATA_OUT
350 MOVE FROM dsa_dataout+0x0300, WHEN DATA_OUT
351 MOVE FROM dsa_dataout+0x0308, WHEN DATA_OUT
352 MOVE FROM dsa_dataout+0x0310, WHEN DATA_OUT
353 MOVE FROM dsa_dataout+0x0318, WHEN DATA_OUT
354 MOVE FROM dsa_dataout+0x0320, WHEN DATA_OUT
355 MOVE FROM dsa_dataout+0x0328, WHEN DATA_OUT
356 MOVE FROM dsa_dataout+0x0330, WHEN DATA_OUT
357 MOVE FROM dsa_dataout+0x0338, WHEN DATA_OUT
358 MOVE FROM dsa_dataout+0x0340, WHEN DATA_OUT
359 MOVE FROM dsa_dataout+0x0348, WHEN DATA_OUT
360 MOVE FROM dsa_dataout+0x0350, WHEN DATA_OUT
361 MOVE FROM dsa_dataout+0x0358, WHEN DATA_OUT
362 MOVE FROM dsa_dataout+0x0360, WHEN DATA_OUT
363 MOVE FROM dsa_dataout+0x0368, WHEN DATA_OUT
364 MOVE FROM dsa_dataout+0x0370, WHEN DATA_OUT
365 MOVE FROM dsa_dataout+0x0378, WHEN DATA_OUT
366 MOVE FROM dsa_dataout+0x0380, WHEN DATA_OUT
367 MOVE FROM dsa_dataout+0x0388, WHEN DATA_OUT
368 MOVE FROM dsa_dataout+0x0390, WHEN DATA_OUT
369 MOVE FROM dsa_dataout+0x0398, WHEN DATA_OUT
370 MOVE FROM dsa_dataout+0x03a0, WHEN DATA_OUT
371 MOVE FROM dsa_dataout+0x03a8, WHEN DATA_OUT
372 MOVE FROM dsa_dataout+0x03b0, WHEN DATA_OUT
373 MOVE FROM dsa_dataout+0x03b8, WHEN DATA_OUT
374 MOVE FROM dsa_dataout+0x03c0, WHEN DATA_OUT
375 MOVE FROM dsa_dataout+0x03c8, WHEN DATA_OUT
376 MOVE FROM dsa_dataout+0x03d0, WHEN DATA_OUT
377 MOVE FROM dsa_dataout+0x03d8, WHEN DATA_OUT
378 MOVE FROM dsa_dataout+0x03e0, WHEN DATA_OUT
379 MOVE FROM dsa_dataout+0x03e8, WHEN DATA_OUT
380 MOVE FROM dsa_dataout+0x03f0, WHEN DATA_OUT
381 MOVE FROM dsa_dataout+0x03f8, WHEN DATA_OUT
385 JUMP get_status, WHEN STATUS
386 JUMP get_msgin3, WHEN MSG_IN
387 INT int_data_bad_phase
390 MOVE SCRATCH0 | had_msgin TO SCRATCH0
391 MOVE 1, msgin_buf, WHEN MSG_IN
392 JUMP ext_msg1, IF 0x01 ; Extended Message
393 JUMP ignore_msg1, IF 0x02 ; Save Data Pointers
394 JUMP ignore_msg1, IF 0x03 ; Save Restore Pointers
395 JUMP disc1, IF 0x04 ; Disconnect
401 MOVE SCRATCH0 | had_extmsg TO SCRATCH0
403 MOVE 1, msgin_buf + 1, WHEN MSG_IN
404 JUMP ext_msg1a, IF 0x03
408 MOVE 1, msgin_buf + 2, WHEN MSG_IN
409 JUMP ext_msg1b, IF 0x01 ; Must be SDTR
413 MOVE 2, msgin_buf + 3, WHEN MSG_IN
429 INT int_no_msgout1, WHEN NOT MSG_OUT
430 MOVE SCRATCH0 | had_msgout TO SCRATCH0
431 MOVE FROM dsa_msgout, when MSG_OUT
435 MOVE SCRATCH0 | had_msgin TO SCRATCH0
436 MOVE 1, msgin_buf, WHEN MSG_IN
437 JUMP ext_msg2, IF 0x01 ; Extended Message
438 JUMP ignore_msg2, IF 0x02 ; Save Data Pointers
439 JUMP ignore_msg2, IF 0x03 ; Save Restore Pointers
440 JUMP disc2, IF 0x04 ; Disconnect
446 MOVE SCRATCH0 | had_extmsg TO SCRATCH0
448 MOVE 1, msgin_buf + 1, WHEN MSG_IN
449 JUMP ext_msg2a, IF 0x03
453 MOVE 1, msgin_buf + 2, WHEN MSG_IN
454 JUMP ext_msg2b, IF 0x01 ; Must be SDTR
458 MOVE 2, msgin_buf + 3, WHEN MSG_IN
474 INT int_no_msgout2, WHEN NOT MSG_OUT
475 MOVE SCRATCH0 | had_msgout TO SCRATCH0
476 MOVE FROM dsa_msgout, when MSG_OUT
480 MOVE SCRATCH0 | had_msgin TO SCRATCH0
481 MOVE 1, msgin_buf, WHEN MSG_IN
482 JUMP ext_msg3, IF 0x01 ; Extended Message
483 JUMP ignore_msg3, IF 0x02 ; Save Data Pointers
484 JUMP ignore_msg3, IF 0x03 ; Save Restore Pointers
485 JUMP disc3, IF 0x04 ; Disconnect
491 MOVE SCRATCH0 | had_extmsg TO SCRATCH0
493 MOVE 1, msgin_buf + 1, WHEN MSG_IN
494 JUMP ext_msg3a, IF 0x03
498 MOVE 1, msgin_buf + 2, WHEN MSG_IN
499 JUMP ext_msg3b, IF 0x01 ; Must be SDTR
503 MOVE 2, msgin_buf + 3, WHEN MSG_IN
519 INT int_no_msgout3, WHEN NOT MSG_OUT
520 MOVE SCRATCH0 | had_msgout TO SCRATCH0
521 MOVE FROM dsa_msgout, when MSG_OUT
524 ENTRY resume_rej_ident
527 MOVE 1, msgin_buf, WHEN MSG_IN
528 INT int_not_rej, IF NOT 0x07 ; Reject
534 ; Disable selection timer
535 MOVE CTEST7 | 0x10 TO CTEST7
536 WAIT RESELECT resel_err
537 INT int_resel_not_msgin, WHEN NOT MSG_IN
538 MOVE 1, reselected_identify, WHEN MSG_IN
541 MOVE CTEST2 & 0x40 TO SFBR
542 JUMP selected, IF 0x00
543 MOVE SFBR & 0 TO SFBR
546 MOVE SFBR | 0x11 TO DSA0
547 MOVE SFBR | 0x22 TO DSA1
548 MOVE SFBR | 0x33 TO DSA2
549 MOVE SFBR | 0x44 TO DSA3