Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1186 | savelij | 1 | cpu 6309 |
2 | |||
3 | list macro |
||
4 | listing on |
||
5 | endm |
||
6 | |||
7 | nolist macro |
||
8 | listing off |
||
9 | endm |
||
10 | |||
11 | db macro op |
||
12 | byt (op) |
||
13 | endm |
||
14 | |||
15 | fcb macro op |
||
16 | byt (op) |
||
17 | endm |
||
18 | |||
19 | fcc macro op |
||
20 | byt (op) |
||
21 | endm |
||
22 | |||
23 | dw macro op |
||
24 | adr (op) |
||
25 | endm |
||
26 | |||
27 | fdb macro op |
||
28 | adr (op) |
||
29 | endm |
||
30 | |||
31 | fcw macro op |
||
32 | adr (op) |
||
33 | endm |
||
34 | |||
35 | ds macro op |
||
36 | dfs (op) |
||
37 | endm |
||
38 | |||
39 | rmb macro op |
||
40 | rept op |
||
41 | db 0 |
||
42 | endm |
||
43 | endm |
||
44 | |||
45 | dd macro op |
||
46 | adr (op)>>16,(op)&$ffff |
||
47 | endm |
||
48 | |||
49 | fcd macro op |
||
50 | adr (op)>>16,(op)&$ffff |
||
51 | endm |
||
52 | |||
53 | direct macro num |
||
54 | if num=-1 |
||
55 | assume dpr:nothing |
||
56 | elseif num>255 |
||
57 | assume dpr:num>>8 |
||
58 | elseif |
||
59 | assume dpr:num |
||
60 | endif |
||
61 | endm |
||
62 | |||
63 | page macro |
||
64 | newpage |
||
65 | endm |
||
66 | |||
67 | opt macro |
||
68 | endm |
||
69 | |||
70 | noopt macro |
||
71 | endm |
||
72 | |||
73 | nop macro cnt |
||
74 | if "CNT"="" |
||
75 | __cnt set 1 |
||
76 | elseif |
||
77 | __cnt set cnt |
||
78 | endif |
||
79 | rept __cnt |
||
80 | !nop |
||
81 | endm |
||
82 | endm |
||
83 | |||
84 | momseg set 0 |
||
85 | segsave_code set 0 |
||
86 | segsave_data set 0 |
||
87 | segsave_bss set 0 |
||
88 | |||
89 | saveseg macro |
||
90 | switch momseg |
||
91 | case 0 |
||
92 | segsave_code set * |
||
93 | case 1 |
||
94 | segsave_data set * |
||
95 | case 2 |
||
96 | segsave_bss set * |
||
97 | endcase |
||
98 | endm |
||
99 | |||
100 | data macro |
||
101 | saveseg |
||
102 | org segsave_data |
||
103 | momseg set 1 |
||
104 | endm |
||
105 | |||
106 | code macro |
||
107 | saveseg |
||
108 | org segsave_code |
||
109 | momseg set 0 |
||
110 | endm |
||
111 | |||
112 | bss macro |
||
113 | saveseg |
||
114 | org segsave_bss |
||
115 | momseg set 2 |
||
116 | endm |
||
117 | |||
118 | ;-------------------------------------------------------------------------- |
||
119 | |||
120 | ; <:t17,25,41,45:> |
||
121 | ; +=====================================================================+ |
||
122 | ; | | |
||
123 | ; | TESTCASE.A09 | |
||
124 | ; | | |
||
125 | ; | Test case for 6809/6309 assembler. | |
||
126 | ; | | |
||
127 | ; | Copyright 1993, Frank A. Vorstenbosch | |
||
128 | ; | | |
||
129 | ; +=====================================================================+ |
||
130 | ; |
||
131 | ; File created 13-oct-93 |
||
132 | |||
133 | title "Test case for 6809/6309 assembler" |
||
134 | |||
135 | list |
||
136 | |||
137 | ; +---------------------------------------------------------------------+ |
||
138 | ; | | |
||
139 | ; | Options. | |
||
140 | ; | | |
||
141 | ; +---------------------------------------------------------------------+ |
||
142 | |||
143 | ; -dERRORS check error handling |
||
144 | ; -n disable optimizations |
||
145 | |||
146 | |||
147 | ; +---------------------------------------------------------------------+ |
||
148 | ; | | |
||
149 | ; | Assembler pseudo instructions. | |
||
150 | ; | | |
||
151 | ; +---------------------------------------------------------------------+ |
||
152 | |||
153 | ; ----- expressions ----------------------------------------------------- |
||
154 | |||
155 | data |
||
156 | org 4 |
||
157 | bss |
||
158 | org 1634 |
||
159 | |||
160 | TEST equ 2+*/2 |
||
161 | ifdef ERRORS |
||
162 | TEST equ TEST+1 |
||
163 | endif |
||
164 | |||
165 | Constant8 equ -43 |
||
166 | Constant16 equ 16383 |
||
167 | Constant32 equ 96285725 |
||
168 | Address equ $bb5a |
||
169 | |||
170 | ANOTHER set 3|24&8 |
||
171 | ANOTHER set (3|24)&8 |
||
172 | ANOTHER set 4*(3>5) |
||
173 | ANOTHER set 4*~~(3<5) |
||
174 | ANOTHER set 15<<4 |
||
175 | ANOTHER set ANOTHER+1 |
||
176 | ANOTHER set ANOTHER+1 ; shorthand for SET |
||
177 | |||
178 | CHAR equ "a" |
||
179 | DOUBLECHAR equ "xy" |
||
180 | QUADCHAR equ "quad" |
||
181 | |||
182 | ifdef ERRORS |
||
183 | TRIPLE equ "abc" |
||
184 | TOOMUCH equ "abcde" |
||
185 | endif |
||
186 | |||
187 | data |
||
188 | AddressFour dw TEST |
||
189 | dw **5 |
||
190 | |||
191 | org $800 |
||
192 | |||
193 | direct $8 |
||
194 | direct $0800 |
||
195 | |||
196 | ds 14 |
||
197 | DirectByte db 123 |
||
198 | align 32 |
||
199 | DirectWord dw 12345 |
||
200 | align 48 |
||
201 | DirectLong dd 123456789 |
||
202 | align 79 |
||
203 | DirectCode rts |
||
204 | |||
205 | dw 1234#12 |
||
206 | dw %1010100101 |
||
207 | dw (1+2)#8 |
||
208 | dw 1010101#%1010101 |
||
209 | |||
210 | bss |
||
211 | Unin_1 db 0 |
||
212 | Unin_2 dw 4256 |
||
213 | Unin_3 dd 34568957 |
||
214 | |||
215 | code |
||
216 | org $200 |
||
217 | |||
218 | page |
||
219 | |||
220 | ifdef ERRORS |
||
221 | 1 |
||
222 | equ 123 |
||
223 | psscht |
||
224 | ! |
||
225 | endif |
||
226 | |||
227 | ; ----- range checking on immediate values ------------------------------ |
||
228 | |||
229 | lda #10 |
||
230 | lda #100 |
||
231 | ifdef ERRORS |
||
232 | lda #1000 |
||
233 | lda #10000 |
||
234 | lda #100000 |
||
235 | lda #1000000 |
||
236 | lda #10000000 |
||
237 | lda #100000000 |
||
238 | lda #1000000000 |
||
239 | endif |
||
240 | |||
241 | ldx #10 |
||
242 | ldx #100 |
||
243 | ldx #1000 |
||
244 | ldx #10000 |
||
245 | ifdef ERRORS |
||
246 | ldx #100000 |
||
247 | ldx #1000000 |
||
248 | ldx #10000000 |
||
249 | ldx #100000000 |
||
250 | ldx #1000000000 |
||
251 | endif |
||
252 | |||
253 | ifdef __6309__ |
||
254 | ldq #10 |
||
255 | ldq #100 |
||
256 | ldq #1000 |
||
257 | ldq #10000 |
||
258 | ldq #100000 |
||
259 | ldq #1000000 |
||
260 | ldq #10000000 |
||
261 | ldq #100000000 |
||
262 | ldq #1000000000 |
||
263 | endif |
||
264 | |||
265 | page 10 ; keep 10 lines togethre |
||
266 | |||
267 | ; ----- align ----------------------------------------------------------- |
||
268 | |||
269 | align 16 |
||
270 | align 32 |
||
271 | |||
272 | |||
273 | ; ----- code, data, org ------------------------------------------------- |
||
274 | |||
275 | code |
||
276 | org $1300 |
||
277 | data |
||
278 | org $1180 |
||
279 | |||
280 | code |
||
281 | lda #1 |
||
282 | |||
283 | data |
||
284 | Table db 1,2,3 |
||
285 | |||
286 | code |
||
287 | ldx #Table |
||
288 | |||
289 | |||
290 | ; ----- db, fcb, fcc ---------------------------------------------------- |
||
291 | |||
292 | Message1 db 7,"Error",13,10,0 |
||
293 | |||
294 | Message2 fcb 7 |
||
295 | fcc "Error" |
||
296 | fcb 13,10,0 |
||
297 | |||
298 | |||
299 | ; ----- ds, rmb --------------------------------------------------------- |
||
300 | |||
301 | ds 10 |
||
302 | rmb 10 |
||
303 | |||
304 | |||
305 | ; ----- dw, fcw, fdb ---------------------------------------------------- |
||
306 | |||
307 | dw 23457 |
||
308 | fcw 13462 |
||
309 | fdb 6235 |
||
310 | |||
311 | |||
312 | ; ----- if ... else ... endif ------------------------------------------- |
||
313 | |||
314 | if 5=6 |
||
315 | db 0 |
||
316 | if 0 |
||
317 | db 1 |
||
318 | else |
||
319 | db 2 |
||
320 | endif |
||
321 | db 3 |
||
322 | else |
||
323 | db 4 |
||
324 | if 1 |
||
325 | db 5 |
||
326 | else |
||
327 | db 6 |
||
328 | endif |
||
329 | db 7 |
||
330 | endif |
||
331 | |||
332 | |||
333 | ; ----- list, nolist ---------------------------------------------------- |
||
334 | |||
335 | nolist |
||
336 | ; comment not listed |
||
337 | db 10 |
||
338 | |||
339 | list |
||
340 | ; comment is listed |
||
341 | db 10 |
||
342 | |||
343 | |||
344 | ; ----- opt, noopt ------------------------------------------------------ |
||
345 | |||
346 | noopt |
||
347 | |||
348 | opt |
||
349 | |||
350 | |||
351 | ; ----- nop ------------------------------------------------------------- |
||
352 | |||
353 | nop |
||
354 | nop 3 |
||
355 | |||
356 | |||
357 | ; ----- struct ---------------------------------------------------------- |
||
358 | |||
359 | ; struct ListNode |
||
360 | ; dw LN_Next |
||
361 | ; dw LN_Previous |
||
362 | ; db LN_Type |
||
363 | ; end struct |
||
364 | |||
365 | |||
366 | ; ----- number bases ---------------------------------------------------- |
||
367 | |||
368 | dd 1 |
||
369 | dd 10 |
||
370 | dd 100 |
||
371 | dd 1000 |
||
372 | |||
373 | dd $1 |
||
374 | dd $10 |
||
375 | dd $100 |
||
376 | dd $1000 |
||
377 | |||
378 | dd %1 |
||
379 | dd %10 |
||
380 | dd %100 |
||
381 | dd %1000 |
||
382 | |||
383 | dd @1 |
||
384 | dd @10 |
||
385 | dd @100 |
||
386 | dd @1000 |
||
387 | |||
388 | dd 2#1 |
||
389 | dd 2#10 |
||
390 | dd 2#100 |
||
391 | dd 2#1000 |
||
392 | |||
393 | dd 3#1 |
||
394 | dd 3#10 |
||
395 | dd 3#100 |
||
396 | dd 3#1000 |
||
397 | dd 3#12 |
||
398 | |||
399 | dd 4#1 |
||
400 | dd 4#10 |
||
401 | dd 4#100 |
||
402 | dd 4#1000 |
||
403 | dd 4#123 |
||
404 | |||
405 | dd 5#1 |
||
406 | dd 5#10 |
||
407 | dd 5#100 |
||
408 | dd 5#1000 |
||
409 | dd 5#1234 |
||
410 | |||
411 | dd 6#1 |
||
412 | dd 6#10 |
||
413 | dd 6#100 |
||
414 | dd 6#1000 |
||
415 | dd 6#2345 |
||
416 | |||
417 | dd 7#1 |
||
418 | dd 7#10 |
||
419 | dd 7#100 |
||
420 | dd 7#1000 |
||
421 | dd 7#3456 |
||
422 | |||
423 | dd 8#1 |
||
424 | dd 8#10 |
||
425 | dd 8#100 |
||
426 | dd 8#1000 |
||
427 | dd 8#4567 |
||
428 | |||
429 | dd 9#1 |
||
430 | dd 9#10 |
||
431 | dd 9#100 |
||
432 | dd 9#1000 |
||
433 | dd 9#5678 |
||
434 | |||
435 | dd 10#1 |
||
436 | dd 10#10 |
||
437 | dd 10#100 |
||
438 | dd 10#1000 |
||
439 | dd 10#6789 |
||
440 | |||
441 | dd 11#1 |
||
442 | dd 11#10 |
||
443 | dd 11#100 |
||
444 | dd 11#1000 |
||
445 | ; dd 11#789a |
||
446 | |||
447 | dd 12#1 |
||
448 | dd 12#10 |
||
449 | dd 12#100 |
||
450 | dd 12#1000 |
||
451 | ; dd 12#89ab |
||
452 | |||
453 | dd 13#1 |
||
454 | dd 13#10 |
||
455 | dd 13#100 |
||
456 | dd 13#1000 |
||
457 | ; dd 13#9abc |
||
458 | |||
459 | dd 14#1 |
||
460 | dd 14#10 |
||
461 | dd 14#100 |
||
462 | dd 14#1000 |
||
463 | ; dd 14#abcd |
||
464 | |||
465 | dd 15#1 |
||
466 | dd 15#10 |
||
467 | dd 15#100 |
||
468 | dd 15#1000 |
||
469 | ; dd 15#bcde |
||
470 | |||
471 | dd 16#1 |
||
472 | dd 16#10 |
||
473 | dd 16#100 |
||
474 | dd 16#1000 |
||
475 | ; dd 16#cdef |
||
476 | |||
477 | dd 17#1 |
||
478 | dd 17#10 |
||
479 | dd 17#100 |
||
480 | dd 17#1000 |
||
481 | ; dd 17#defg |
||
482 | |||
483 | dd 18#1 |
||
484 | dd 18#10 |
||
485 | dd 18#100 |
||
486 | dd 18#1000 |
||
487 | ; dd 18#efgh |
||
488 | |||
489 | dd 19#1 |
||
490 | dd 19#10 |
||
491 | dd 19#100 |
||
492 | dd 19#1000 |
||
493 | ; dd 19#fghi |
||
494 | |||
495 | dd 20#1 |
||
496 | dd 20#10 |
||
497 | dd 20#100 |
||
498 | dd 20#1000 |
||
499 | ; dd 20#ghij |
||
500 | |||
501 | dd 21#1 |
||
502 | dd 21#10 |
||
503 | dd 21#100 |
||
504 | dd 21#1000 |
||
505 | ; dd 21#hijk |
||
506 | |||
507 | dd 22#1 |
||
508 | dd 22#10 |
||
509 | dd 22#100 |
||
510 | dd 22#1000 |
||
511 | ; dd 22#ijkl |
||
512 | |||
513 | dd 23#1 |
||
514 | dd 23#10 |
||
515 | dd 23#100 |
||
516 | dd 23#1000 |
||
517 | ; dd 23#jklm |
||
518 | |||
519 | dd 24#1 |
||
520 | dd 24#10 |
||
521 | dd 24#100 |
||
522 | dd 24#1000 |
||
523 | ; dd 24#klmn |
||
524 | |||
525 | dd 25#1 |
||
526 | dd 25#10 |
||
527 | dd 25#100 |
||
528 | dd 25#1000 |
||
529 | ; dd 25#lmno |
||
530 | |||
531 | dd 26#1 |
||
532 | dd 26#10 |
||
533 | dd 26#100 |
||
534 | dd 26#1000 |
||
535 | ; dd 26#mnop |
||
536 | |||
537 | dd 27#1 |
||
538 | dd 27#10 |
||
539 | dd 27#100 |
||
540 | dd 27#1000 |
||
541 | ; dd 27#nopq |
||
542 | |||
543 | dd 28#1 |
||
544 | dd 28#10 |
||
545 | dd 28#100 |
||
546 | dd 28#1000 |
||
547 | ; dd 28#opqr |
||
548 | |||
549 | dd 29#1 |
||
550 | dd 29#10 |
||
551 | dd 29#100 |
||
552 | dd 29#1000 |
||
553 | ; dd 29#pqrs |
||
554 | |||
555 | dd 30#1 |
||
556 | dd 30#10 |
||
557 | dd 30#100 |
||
558 | dd 30#1000 |
||
559 | ; dd 30#qrst |
||
560 | |||
561 | dd 31#1 |
||
562 | dd 31#10 |
||
563 | dd 31#100 |
||
564 | dd 31#1000 |
||
565 | ; dd 31#rstu |
||
566 | |||
567 | dd 32#1 |
||
568 | dd 32#10 |
||
569 | dd 32#100 |
||
570 | dd 32#1000 |
||
571 | ; dd 32#stuv |
||
572 | |||
573 | dd 33#1 |
||
574 | dd 33#10 |
||
575 | dd 33#100 |
||
576 | dd 33#1000 |
||
577 | ; dd 33#tuvw |
||
578 | |||
579 | dd 34#1 |
||
580 | dd 34#10 |
||
581 | dd 34#100 |
||
582 | dd 34#1000 |
||
583 | ; dd 34#uvwx |
||
584 | |||
585 | dd 35#1 |
||
586 | dd 35#10 |
||
587 | dd 35#100 |
||
588 | dd 35#1000 |
||
589 | ; dd 35#vwxy |
||
590 | |||
591 | dd 36#1 |
||
592 | dd 36#10 |
||
593 | dd 36#100 |
||
594 | dd 36#1000 |
||
595 | ; dd 36#wxyz |
||
596 | |||
597 | ifdef ERRORS |
||
598 | dd 37#1 |
||
599 | dd 37#10 |
||
600 | dd 37#100 |
||
601 | dd 37#1000 |
||
602 | |||
603 | dd 1#1 |
||
604 | dd 1#10 |
||
605 | dd 1#100 |
||
606 | dd 1#1000 |
||
607 | |||
608 | dd 0#1 |
||
609 | dd 0#10 |
||
610 | dd 0#100 |
||
611 | dd 0#1000 |
||
612 | endif |
||
613 | |||
614 | |||
615 | ; ----- garbage in inactive if-clause ----------------------------------- |
||
616 | |||
617 | if 0 |
||
618 | !"#$%&'()*+,-./ |
||
619 | 0123456789:;<=>? |
||
620 | @ABCDEFGHIJKLMNO |
||
621 | PQRSTUVWXYZ[\]^_ |
||
622 | `abcdefghijklmno |
||
623 | pqrstuvwxyz{|}~ |
||
624 | ���������������� |
||
625 | ���������������� |
||
626 | ���������������� |
||
627 | ���|������|+���� |
||
628 | ����-����+���=�� |
||
629 | ���������������� |
||
630 | ���������������� |
||
631 | ��������������� |
||
632 | endif |
||
633 | |||
634 | |||
635 | ; +=====================================================================+ |
||
636 | ; | | |
||
637 | ; | Instructions. | |
||
638 | ; | | |
||
639 | ; �=====================================================================� |
||
640 | |||
641 | ; �---------------------------------------------------------------------� |
||
642 | ; | | |
||
643 | ; | Register to register operations. | |
||
644 | ; | | |
||
645 | ; �---------------------------------------------------------------------� |
||
646 | |||
647 | Start tfr a,a ; NOP |
||
648 | tfr a,b |
||
649 | tfr a,cc |
||
650 | tfr a,ccr |
||
651 | tfr a,dp |
||
652 | tfr a,dpr |
||
653 | |||
654 | tfr b,a |
||
655 | tfr b,b ; NOP |
||
656 | tfr b,cc |
||
657 | tfr b,ccr |
||
658 | tfr b,dp |
||
659 | tfr b,dpr |
||
660 | |||
661 | tfr d,d ; NOP |
||
662 | tfr d,x |
||
663 | tfr d,y |
||
664 | tfr d,u |
||
665 | tfr d,s |
||
666 | tfr d,sp |
||
667 | |||
668 | tfr x,d |
||
669 | tfr x,x ; NOP |
||
670 | tfr x,y |
||
671 | tfr x,u |
||
672 | tfr x,s |
||
673 | tfr x,sp |
||
674 | |||
675 | tfr y,d |
||
676 | tfr y,x |
||
677 | tfr y,y ; NOP |
||
678 | tfr y,u |
||
679 | tfr y,s |
||
680 | tfr y,sp |
||
681 | |||
682 | tfr u,d |
||
683 | tfr u,x |
||
684 | tfr u,y |
||
685 | tfr u,u ; NOP |
||
686 | tfr u,s |
||
687 | tfr u,sp |
||
688 | |||
689 | tfr s,d |
||
690 | tfr s,x |
||
691 | tfr s,y |
||
692 | tfr s,u |
||
693 | tfr s,s ; NOP |
||
694 | tfr s,sp ; NOP |
||
695 | |||
696 | tfr sp,d |
||
697 | tfr sp,x |
||
698 | tfr sp,y |
||
699 | tfr sp,u |
||
700 | tfr sp,s ; NOP |
||
701 | tfr sp,sp ; NOP |
||
702 | |||
703 | tfr pc,d |
||
704 | tfr pc,x |
||
705 | tfr pc,y |
||
706 | tfr pc,u |
||
707 | tfr pc,s |
||
708 | tfr pc,sp |
||
709 | |||
710 | ifdef __6309__ |
||
711 | tfr a,e |
||
712 | tfr a,f |
||
713 | tfr b,e |
||
714 | tfr b,f |
||
715 | |||
716 | tfr e,a |
||
717 | tfr e,b |
||
718 | tfr e,cc |
||
719 | tfr e,ccr |
||
720 | tfr e,dp |
||
721 | tfr e,dpr |
||
722 | tfr e,e ; NOP |
||
723 | tfr e,f |
||
724 | |||
725 | tfr f,a |
||
726 | tfr f,b |
||
727 | tfr f,cc |
||
728 | tfr f,ccr |
||
729 | tfr f,dp |
||
730 | tfr f,dpr |
||
731 | tfr f,e |
||
732 | tfr f,f ; NOP |
||
733 | |||
734 | tfr d,v |
||
735 | tfr d,w |
||
736 | |||
737 | tfr v,d |
||
738 | tfr v,v ; NOP |
||
739 | tfr v,w |
||
740 | tfr v,x |
||
741 | tfr v,y |
||
742 | tfr v,u |
||
743 | tfr v,s |
||
744 | tfr v,sp |
||
745 | |||
746 | tfr w,d |
||
747 | tfr w,v |
||
748 | tfr w,w ; NOP |
||
749 | tfr w,x |
||
750 | tfr w,y |
||
751 | tfr w,u |
||
752 | tfr w,s |
||
753 | tfr w,sp |
||
754 | |||
755 | tfr x,v |
||
756 | tfr x,w |
||
757 | tfr y,v |
||
758 | tfr y,w |
||
759 | tfr u,v |
||
760 | tfr u,w |
||
761 | tfr s,v |
||
762 | tfr s,w |
||
763 | tfr pc,v |
||
764 | tfr pc,w |
||
765 | |||
766 | tfr z,a |
||
767 | tfr z,b |
||
768 | tfr z,cc |
||
769 | tfr z,ccr |
||
770 | tfr z,dp |
||
771 | tfr z,dpr |
||
772 | tfr z,e |
||
773 | tfr z,f |
||
774 | tfr z,d |
||
775 | tfr z,v |
||
776 | tfr z,w |
||
777 | tfr z,x |
||
778 | tfr z,y |
||
779 | tfr z,u |
||
780 | tfr z,s |
||
781 | tfr z,sp |
||
782 | |||
783 | tfr a,z |
||
784 | tfr b,z |
||
785 | tfr cc,z |
||
786 | tfr ccr,z |
||
787 | tfr dp,z |
||
788 | tfr dpr,z |
||
789 | tfr e,z |
||
790 | tfr f,z |
||
791 | tfr d,z |
||
792 | tfr v,z |
||
793 | tfr w,z |
||
794 | tfr x,z |
||
795 | tfr y,z |
||
796 | tfr u,z |
||
797 | tfr s,z |
||
798 | tfr sp,z |
||
799 | tfr pc,z |
||
800 | endif |
||
801 | |||
802 | ifdef ERRORS |
||
803 | tfm a,b |
||
804 | tfr a,d |
||
805 | tfr a,v |
||
806 | tfr a,w |
||
807 | tfr a,x |
||
808 | tfr a,y |
||
809 | tfr a,u |
||
810 | tfr a,s |
||
811 | tfr a,sp |
||
812 | |||
813 | tfr b,d |
||
814 | tfr b,v |
||
815 | tfr b,w |
||
816 | tfr b,x |
||
817 | tfr b,y |
||
818 | tfr b,u |
||
819 | tfr b,s |
||
820 | tfr b,sp |
||
821 | endif |
||
822 | |||
823 | |||
824 | ; +---------------------------------------------------------------------+ |
||
825 | ; | | |
||
826 | ; | Addressing modes. | |
||
827 | ; | | |
||
828 | ; +---------------------------------------------------------------------+ |
||
829 | |||
830 | lda #0 |
||
831 | lda DirectByte |
||
832 | lda >DirectByte |
||
833 | lda AddressFour |
||
834 | ifdef ERRORS |
||
835 | lda <AddressFour |
||
836 | endif |
||
837 | lda 12+5*17/3 |
||
838 | lda ,x |
||
839 | noopt |
||
840 | lda 0,x |
||
841 | opt |
||
842 | lda 0,x |
||
843 | lda <0,x |
||
844 | lda <<0,x |
||
845 | noopt |
||
846 | lda <<0,x |
||
847 | opt |
||
848 | lda >0,x |
||
849 | lda 1,x |
||
850 | lda <1,x |
||
851 | lda <<1,x |
||
852 | lda >1,x |
||
853 | lda 15,x |
||
854 | lda -16,x |
||
855 | lda 16,x |
||
856 | lda -17,x |
||
857 | lda 127,x |
||
858 | lda -128,x |
||
859 | lda 128,x |
||
860 | lda -129,x |
||
861 | lda FORWARD5,x |
||
862 | lda <FORWARD5,x |
||
863 | lda <<FORWARD5,x |
||
864 | lda FORWARD99,x |
||
865 | lda <FORWARD99,x |
||
866 | ifdef ERRORS |
||
867 | lda <<FORWARD99,x |
||
868 | endif |
||
869 | lda a,x |
||
870 | lda b,x |
||
871 | lda d,x |
||
872 | lda ,x+ |
||
873 | lda ,x++ |
||
874 | lda ,-x |
||
875 | lda ,--x |
||
876 | lda NearData,pc |
||
877 | lda <NearData,pc |
||
878 | lda AddressFour,pc |
||
879 | lda [,x] |
||
880 | lda [0,x] |
||
881 | lda [1,x] |
||
882 | lda [15,x] |
||
883 | lda [-16,x] |
||
884 | lda [17,x] |
||
885 | lda [-17,x] |
||
886 | lda [127,x] |
||
887 | lda [-128,x] |
||
888 | lda [128,x] |
||
889 | lda [-129,x] |
||
890 | lda [a,x] |
||
891 | lda [b,x] |
||
892 | NearData lda [d,x] |
||
893 | lda [,x++] |
||
894 | lda [,--x] |
||
895 | lda [NearData,pc] |
||
896 | lda [>NearData,pc] |
||
897 | lda [AddressFour,pc] |
||
898 | ifdef ERRORS |
||
899 | lda [<AddressFour,pc] |
||
900 | endif |
||
901 | |||
902 | FORWARD5 equ 5 |
||
903 | FORWARD99 equ 99 |
||
904 | |||
905 | ifdef __6309__ |
||
906 | lda e,x |
||
907 | lda f,x |
||
908 | lda w,x |
||
909 | lda ,w |
||
910 | lda 0,w |
||
911 | lda 1,w |
||
912 | lda ,w++ |
||
913 | lda ,--w |
||
914 | lda [e,x] |
||
915 | lda [f,x] |
||
916 | lda [w,x] |
||
917 | lda [,w] |
||
918 | lda [0,w] |
||
919 | lda [1000,w] |
||
920 | lda [,w++] |
||
921 | lda [,--w] |
||
922 | endif |
||
923 | |||
924 | |||
925 | ; +---------------------------------------------------------------------+ |
||
926 | ; | | |
||
927 | ; | Instructions in numerical order. | |
||
928 | ; | | |
||
929 | ; +---------------------------------------------------------------------+ |
||
930 | |||
931 | neg DirectByte ; $00,2 |
||
932 | ifdef __6309__ |
||
933 | oim #123,DirectByte ; $01,3 |
||
934 | aim #123,DirectByte ; $02,3 |
||
935 | endif |
||
936 | com DirectByte ; $03,2 |
||
937 | lsr DirectByte ; $04,2 |
||
938 | ifdef __6309__ |
||
939 | eim #123,DirectByte ; $05,3 |
||
940 | endif |
||
941 | ror DirectByte ; $06,2 |
||
942 | asr DirectByte ; $07,2 |
||
943 | asl DirectByte ; $08,2 |
||
944 | lsl DirectByte ; alternate |
||
945 | rol DirectByte ; $09,2 |
||
946 | dec DirectByte ; $0A,2 |
||
947 | ifdef __6309__ |
||
948 | tim #1,DirectByte ; $0B,3 |
||
949 | endif |
||
950 | inc DirectByte ; $0C,2 |
||
951 | tst DirectByte ; $0D,2 |
||
952 | jmp DirectByte ; $0E,2 |
||
953 | clr DirectByte ; $0F,2 |
||
954 | |||
955 | ; ----------------------------------------------------------------------- |
||
956 | |||
957 | nop ; $12,1 |
||
958 | nop 4 ; repeat count specified |
||
959 | sync ; $13,1 |
||
960 | ifdef __6309__ |
||
961 | sexw ; $14,1 |
||
962 | endif |
||
963 | noopt |
||
964 | lbra AddressFour ; $16,3 |
||
965 | lbsr AddressFour ; $17,3 |
||
966 | opt |
||
967 | daa ; $19,1 |
||
968 | orcc #1 ; $1A,2 |
||
969 | orcc c ; alternate, specifying flags |
||
970 | andcc #~6 ; $1C,2 |
||
971 | andcc z,v ; alternate |
||
972 | sex ; $1D,1 |
||
973 | exg a,b ; $1E,2 |
||
974 | tfr a,b ; $1F,2 |
||
975 | ifdef __6309__ |
||
976 | clrs ; using TFR to clear registers |
||
977 | clrv |
||
978 | clrx |
||
979 | clry |
||
980 | endif |
||
981 | |||
982 | ; ----------------------------------------------------------------------- |
||
983 | |||
984 | BranchTarget bra BranchTarget ; $20,2 |
||
985 | brn BranchTarget ; $21,2 |
||
986 | bhi BranchTarget ; $22,2 |
||
987 | bls BranchTarget ; $23,2 |
||
988 | bhs BranchTarget ; $24,2 |
||
989 | bcc BranchTarget ; alternate |
||
990 | blo BranchTarget ; $25,2 |
||
991 | bcs BranchTarget ; alternate |
||
992 | bne BranchTarget ; $26,2 |
||
993 | beq BranchTarget ; $27,2 |
||
994 | bvc BranchTarget ; $28,2 |
||
995 | bvs BranchTarget ; $29,2 |
||
996 | bpl BranchTarget ; $2A,2 |
||
997 | bmi BranchTarget ; $2B,2 |
||
998 | bge BranchTarget ; $2C,2 |
||
999 | blt BranchTarget ; $2D,2 |
||
1000 | bgt BranchTarget ; $2E,2 |
||
1001 | ble BranchTarget ; $2F,2 |
||
1002 | |||
1003 | ; ----------------------------------------------------------------------- |
||
1004 | |||
1005 | leax a,x ; 30,2+ |
||
1006 | leay b,y ; 31,2+ |
||
1007 | leas d,s ; 32,2+ |
||
1008 | leau 1,u ; 33,2+ |
||
1009 | pshs a,b ; $34,2 |
||
1010 | pshs d ; alternate |
||
1011 | pshs all ; alternate |
||
1012 | pshs #123 ; alternate |
||
1013 | puls x ; $35,2 |
||
1014 | puls all ; alternate |
||
1015 | puls #$ff ; alternate |
||
1016 | pshu ccr ; $36,2 |
||
1017 | pulu cc ; alternate |
||
1018 | pulu dpr ; $37,2 |
||
1019 | pulu dp ; alternate |
||
1020 | pulu y ; $37,2 |
||
1021 | puls s/u ; $35,2 |
||
1022 | puls u ; alternate |
||
1023 | pshs pc ; $34,2 |
||
1024 | rts ; $39,1 |
||
1025 | abx ; $3A,1 |
||
1026 | rti ; $3B,1 |
||
1027 | cwai #127 ; $3C,2 |
||
1028 | cwai e ; alternate |
||
1029 | mul ; $3D,1 |
||
1030 | swi ; $3F,1 |
||
1031 | |||
1032 | ; ----------------------------------------------------------------------- |
||
1033 | |||
1034 | nega ; $40,1 |
||
1035 | coma ; $43,1 |
||
1036 | lsra ; $44,1 |
||
1037 | rora ; $46,1 |
||
1038 | asra ; $47,1 |
||
1039 | asla ; $48,1 |
||
1040 | lsla ; alternate |
||
1041 | rola ; $49,1 |
||
1042 | deca ; $4A,1 |
||
1043 | inca ; $4C,1 |
||
1044 | tsta ; $4D,1 |
||
1045 | clra ; $4F,1 |
||
1046 | |||
1047 | ; ----------------------------------------------------------------------- |
||
1048 | |||
1049 | negb ; $50,1 |
||
1050 | comb ; $53,1 |
||
1051 | lsrb ; $54,1 |
||
1052 | rorb ; $56,1 |
||
1053 | asrb ; $57,1 |
||
1054 | aslb ; $58,1 |
||
1055 | lslb ; alternate |
||
1056 | rolb ; $59,1 |
||
1057 | decb ; $5A,1 |
||
1058 | incb ; $5C,1 |
||
1059 | tstb ; $5D,1 |
||
1060 | clrb ; $5F,1 |
||
1061 | |||
1062 | ; ----------------------------------------------------------------------- |
||
1063 | |||
1064 | neg ,x ; $60,2+ |
||
1065 | ifdef __6309__ |
||
1066 | oim #4,,x ; $61,3+ |
||
1067 | aim #8,,x ; $62,3+ |
||
1068 | endif |
||
1069 | com ,x ; $63,2+ |
||
1070 | lsr ,x ; $64,2+ |
||
1071 | ifdef __6309__ |
||
1072 | eim #9,,x ; $65,3+ |
||
1073 | endif |
||
1074 | ror ,x ; $66,2+ |
||
1075 | asr ,x ; $67,2+ |
||
1076 | asl ,x ; $68,2+ |
||
1077 | lsl ,x ; alternate |
||
1078 | rol ,x ; $69,2+ |
||
1079 | dec ,x ; $6A,2+ |
||
1080 | ifdef __6309__ |
||
1081 | tim #123,,x ; $6B,3+ |
||
1082 | endif |
||
1083 | inc ,x ; $6C,2+ |
||
1084 | tst ,x ; $6D,2+ |
||
1085 | jmp ,x ; $6E,2+ |
||
1086 | clr ,x ; $6F,2+ |
||
1087 | |||
1088 | ; ----------------------------------------------------------------------- |
||
1089 | |||
1090 | neg AddressFour ; $70,3 |
||
1091 | ifdef __6309__ |
||
1092 | oim #99,AddressFour ; $71,4 |
||
1093 | aim #99,AddressFour ; $72,4 |
||
1094 | endif |
||
1095 | com AddressFour ; $73,3 |
||
1096 | lsr AddressFour ; $74,3 |
||
1097 | ifdef __6309__ |
||
1098 | eim #-1,AddressFour ; $75,4 |
||
1099 | endif |
||
1100 | ror AddressFour ; $76,3 |
||
1101 | asr AddressFour ; $77,3 |
||
1102 | asl AddressFour ; $78,3 |
||
1103 | lsl AddressFour ; alternate |
||
1104 | rol AddressFour ; $79,3 |
||
1105 | dec AddressFour ; $7A,3 |
||
1106 | ifdef __6309__ |
||
1107 | tim #-128,AddressFour ; $7B,4 |
||
1108 | endif |
||
1109 | inc AddressFour ; $7C,3 |
||
1110 | tst AddressFour ; $7D,3 |
||
1111 | jmp AddressFour ; $7E,3 |
||
1112 | clr AddressFour ; $7F,3 |
||
1113 | |||
1114 | ; ----------------------------------------------------------------------- |
||
1115 | |||
1116 | CallAddress suba #123 ; $80,2 |
||
1117 | cmpa #123 ; $81,2 |
||
1118 | sbca #123 ; $82,2 |
||
1119 | subd #12345 ; $83,3 |
||
1120 | anda #123 ; $84,2 |
||
1121 | bita #123 ; $85,2 |
||
1122 | lda #123 ; $86,2 |
||
1123 | eora #123 ; $88,2 |
||
1124 | adca #123 ; $89,2 |
||
1125 | ora #123 ; $8A,2 |
||
1126 | adda #123 ; $8B,2 |
||
1127 | cmpx #12345 ; $8C,3 |
||
1128 | bsr CallAddress ; $8D,2 |
||
1129 | ldx #12345 ; $8E,3 |
||
1130 | |||
1131 | ; ----------------------------------------------------------------------- |
||
1132 | |||
1133 | suba DirectByte ; $90,2 |
||
1134 | cmpa DirectByte ; $91,2 |
||
1135 | sbca DirectByte ; $92,2 |
||
1136 | subd DirectWord ; $93,3 |
||
1137 | anda DirectByte ; $94,2 |
||
1138 | bita DirectByte ; $95,2 |
||
1139 | lda DirectByte ; $96,2 |
||
1140 | sta DirectByte ; $97,2 |
||
1141 | eora DirectByte ; $98,2 |
||
1142 | adca DirectByte ; $99,2 |
||
1143 | ora DirectByte ; $9A,2 |
||
1144 | adda DirectByte ; $9B,2 |
||
1145 | cmpx DirectWord ; $9C,2 |
||
1146 | jsr DirectCode ; $9D,2 |
||
1147 | ldx DirectWord ; $9E,2 |
||
1148 | stx DirectWord ; $9F,2 |
||
1149 | |||
1150 | ; ----------------------------------------------------------------------- |
||
1151 | |||
1152 | suba [3,s] ; $A0,2+ |
||
1153 | cmpa [3,s] ; $A1,2+ |
||
1154 | sbca [3,s] ; $A2,2+ |
||
1155 | subd [3,s] ; $A3,2+ |
||
1156 | anda [3,s] ; $A4,2+ |
||
1157 | bita [3,s] ; $A5,2+ |
||
1158 | lda [3,s] ; $A6,2+ |
||
1159 | sta [3,s] ; $A7,2+ |
||
1160 | eora [3,s] ; $A8,2+ |
||
1161 | adca [3,s] ; $A9,2+ |
||
1162 | ora [3,s] ; $AA,2+ |
||
1163 | adda [3,s] ; $AB,2+ |
||
1164 | cmpx [3,s] ; $AC,2+ |
||
1165 | jsr [3,s] ; $AD,2+ |
||
1166 | ldx [3,s] ; $AE,2+ |
||
1167 | stx [3,s] ; $AF,2+ |
||
1168 | |||
1169 | ; ----------------------------------------------------------------------- |
||
1170 | |||
1171 | suba $ff00 ; $B0,3 |
||
1172 | cmpa $ff00 ; $B1,3 |
||
1173 | sbca $ff00 ; $B2,3 |
||
1174 | subd $ff00 ; $B3,3 |
||
1175 | anda $ff00 ; $B4,3 |
||
1176 | bita $ff00 ; $B5,3 |
||
1177 | lda $ff00 ; $B6,3 |
||
1178 | sta $ff00 ; $B7,3 |
||
1179 | eora $ff00 ; $B8,3 |
||
1180 | adca $ff00 ; $B9,3 |
||
1181 | ora $ff00 ; $BA,3 |
||
1182 | adda $ff00 ; $BB,3 |
||
1183 | cmpx $ff00 ; $BC,3 |
||
1184 | jsr $ff00 ; $BD,3 |
||
1185 | ldx $ff00 ; $BE,3 |
||
1186 | stx $ff00 ; $BF,3 |
||
1187 | |||
1188 | ; ----------------------------------------------------------------------- |
||
1189 | |||
1190 | subb #123 ; $C0,2 |
||
1191 | cmpb #123 ; $C1,2 |
||
1192 | sbcb #123 ; $C2,2 |
||
1193 | addd #12345 ; $C3,3 |
||
1194 | andb #123 ; $C4,2 |
||
1195 | bitb #123 ; $C5,2 |
||
1196 | ldb #123 ; $C6,2 |
||
1197 | eorb #123 ; $C8,2 |
||
1198 | adcb #123 ; $C9,2 |
||
1199 | orb #123 ; $CA,2 |
||
1200 | addb #123 ; $CB,2 |
||
1201 | ldd #12345 ; $CC,3 |
||
1202 | ifdef __6309__ |
||
1203 | ldq #123456789 ; $CD,5 |
||
1204 | endif |
||
1205 | ldu #12345 ; $CE,3 |
||
1206 | |||
1207 | ; ----------------------------------------------------------------------- |
||
1208 | |||
1209 | subb DirectByte ; $D0,2 |
||
1210 | cmpb DirectByte ; $D1,2 |
||
1211 | sbcb DirectByte ; $D2,2 |
||
1212 | addd DirectWord ; $D3,3 |
||
1213 | andb DirectByte ; $D4,2 |
||
1214 | bitb DirectByte ; $D5,2 |
||
1215 | ldb DirectByte ; $D6,2 |
||
1216 | stb DirectByte ; $D7,2 |
||
1217 | eorb DirectByte ; $D8,2 |
||
1218 | adcb DirectByte ; $D9,2 |
||
1219 | orb DirectByte ; $DA,2 |
||
1220 | addb DirectByte ; $DB,2 |
||
1221 | ldd DirectWord ; $DC,2 |
||
1222 | std DirectWord ; $DD,2 |
||
1223 | ldu DirectWord ; $DE,2 |
||
1224 | stu DirectWord ; $DF,2 |
||
1225 | |||
1226 | ; ----------------------------------------------------------------------- |
||
1227 | |||
1228 | ; note effect of quasi-forward reference in the next line |
||
1229 | LocalData subb LocalData,pc ; $E0,2+ |
||
1230 | AnotherLocal cmpb <AnotherLocal,pc ; $E1,2+ |
||
1231 | sbcb LocalData,pc ; $E2,2+ |
||
1232 | addd LocalData,pc ; $E3,2+ |
||
1233 | andb LocalData,pc ; $E4,2+ |
||
1234 | bitb LocalData,pc ; $E5,2+ |
||
1235 | ldb LocalData,pc ; $E6,2+ |
||
1236 | stb LocalData,pc ; $E7,2+ |
||
1237 | eorb LocalData,pc ; $E8,2+ |
||
1238 | adcb LocalData,pc ; $E9,2+ |
||
1239 | orb LocalData,pc ; $EA,2+ |
||
1240 | addb LocalData,pc ; $EB,2+ |
||
1241 | ldd LocalData,pc ; $EC,2+ |
||
1242 | std LocalData,pc ; $ED,2+ |
||
1243 | ldu LocalData,pc ; $EE,2+ |
||
1244 | stu LocalData,pc ; $EF,2+ |
||
1245 | |||
1246 | ; ----------------------------------------------------------------------- |
||
1247 | |||
1248 | subb LocalData ; $F0,3 |
||
1249 | cmpb LocalData ; $F1,3 |
||
1250 | sbcb LocalData ; $F2,3 |
||
1251 | addd LocalData ; $F3,3 |
||
1252 | andb LocalData ; $F4,3 |
||
1253 | bitb LocalData ; $F5,3 |
||
1254 | ldb LocalData ; $F6,3 |
||
1255 | stb LocalData ; $F7,3 |
||
1256 | eorb LocalData ; $F8,3 |
||
1257 | adcb LocalData ; $F9,3 |
||
1258 | orb LocalData ; $FA,3 |
||
1259 | addb LocalData ; $FB,3 |
||
1260 | ldd LocalData ; $FC,3 |
||
1261 | std LocalData ; $FD,3 |
||
1262 | ldu LocalData ; $FE,3 |
||
1263 | stu LocalData ; $FF,3 |
||
1264 | |||
1265 | ; +---------------------------------------------------------------------+ |
||
1266 | ; | | |
||
1267 | ; | Instructions with prefix byte $10. | |
||
1268 | ; | | |
||
1269 | ; +---------------------------------------------------------------------+ |
||
1270 | |||
1271 | lbrn BranchTarget ; $1021,4 |
||
1272 | lbhi BranchTarget ; $1022,4 |
||
1273 | lbls BranchTarget ; $1023,4 |
||
1274 | lbhs BranchTarget ; $1024,4 |
||
1275 | lbcc BranchTarget ; alternate |
||
1276 | lblo BranchTarget ; $1025,4 |
||
1277 | lbcs BranchTarget ; alternate |
||
1278 | lbne BranchTarget ; $1026,4 |
||
1279 | lbeq BranchTarget ; $1027,4 |
||
1280 | lbvc BranchTarget ; $1028,4 |
||
1281 | lbvs BranchTarget ; $1029,4 |
||
1282 | lbpl BranchTarget ; $102A,4 |
||
1283 | lbmi BranchTarget ; $102B,4 |
||
1284 | lbge BranchTarget ; $102C,4 |
||
1285 | lblt BranchTarget ; $102D,4 |
||
1286 | lbgt BranchTarget ; $102E,4 |
||
1287 | lble BranchTarget ; $102F,4 |
||
1288 | |||
1289 | ; ----------------------------------------------------------------------- |
||
1290 | |||
1291 | ifdef __6309__ |
||
1292 | addr a,b ; $1030,3 |
||
1293 | add a,b ; alternate |
||
1294 | adcr w,d ; $1031,3 |
||
1295 | adc w,d ; alternate |
||
1296 | subr d,x ; $1032,3 |
||
1297 | sub d,x ; alternate |
||
1298 | sbcr b,a ; $1033,3 |
||
1299 | sbc b,a ; alternate |
||
1300 | andr a,ccr ; $1034,3 |
||
1301 | and a,ccr ; alternate |
||
1302 | orr b,dpr ; $1035,3 |
||
1303 | or b,dpr ; alternate |
||
1304 | eorr w,d ; $1036,3 |
||
1305 | eor w,d ; alternate |
||
1306 | cmpr d,u ; $1037,3 |
||
1307 | cmp d,u ; alternate |
||
1308 | pshsw ; $1038,2 |
||
1309 | pshs w ; alternate |
||
1310 | pulsw ; $1039,2 |
||
1311 | puls w ; alternate |
||
1312 | pshuw ; $103A,2 |
||
1313 | pshu w ; alternate |
||
1314 | puluw ; $103B,2 |
||
1315 | pulu w ; alternate |
||
1316 | endif |
||
1317 | swi2 ; $103F,2 |
||
1318 | swi 2 ; alternate |
||
1319 | |||
1320 | ; ----------------------------------------------------------------------- |
||
1321 | |||
1322 | ifdef __6309__ |
||
1323 | negd ; $1040,2 |
||
1324 | comd ; $1043,2 |
||
1325 | lsrd ; $1044,2 |
||
1326 | rord ; $1046,2 |
||
1327 | asrd ; $1047,2 |
||
1328 | asld ; $1048,2 |
||
1329 | rold ; $1049,2 |
||
1330 | decd ; $104A,2 |
||
1331 | incd ; $104C,2 |
||
1332 | tstd ; $104D,2 |
||
1333 | clrd ; $104F,2 |
||
1334 | |||
1335 | ; ----------------------------------------------------------------------- |
||
1336 | |||
1337 | comw ; $1053,2 |
||
1338 | lsrw ; $1054,2 |
||
1339 | rorw ; $1056,2 |
||
1340 | rolw ; $1059,2 |
||
1341 | decw ; $105A,2 |
||
1342 | incw ; $105C,2 |
||
1343 | tstw ; $105D,2 |
||
1344 | clrw ; $105F,2 |
||
1345 | |||
1346 | ; ----------------------------------------------------------------------- |
||
1347 | |||
1348 | subw #12345 ; $1080,4 |
||
1349 | cmpw #12345 ; $1081,4 |
||
1350 | sbcd #12345 ; $1082,4 |
||
1351 | endif |
||
1352 | cmpd #12345 ; $1083,4 |
||
1353 | ifdef __6309__ |
||
1354 | andd #12345 ; $1084,4 |
||
1355 | bitd #12345 ; $1085,4 |
||
1356 | ldw #12345 ; $1086,4 |
||
1357 | eord #12345 ; $1088,4 |
||
1358 | adcd #12345 ; $1089,4 |
||
1359 | ord #12345 ; $108A,4 |
||
1360 | addw #12345 ; $108B,4 |
||
1361 | endif |
||
1362 | cmpy #12345 ; $108C,4 |
||
1363 | ldy #12345 ; $108E,4 |
||
1364 | |||
1365 | ; ----------------------------------------------------------------------- |
||
1366 | |||
1367 | ifdef __6309__ |
||
1368 | subw DirectWord ; $1090,3 |
||
1369 | cmpw DirectWord ; $1091,3 |
||
1370 | sbcd DirectWord ; $1092,3 |
||
1371 | endif |
||
1372 | cmpd DirectWord ; $1093,3 |
||
1373 | ifdef __6309__ |
||
1374 | andd DirectWord ; $1094,3 |
||
1375 | bitd DirectWord ; $1095,3 |
||
1376 | ldw DirectWord ; $1096,3 |
||
1377 | stw DirectWord ; $1097,3 |
||
1378 | eord DirectWord ; $1098,3 |
||
1379 | adcd DirectWord ; $1099,3 |
||
1380 | ord DirectWord ; $109A,3 |
||
1381 | addw DirectWord ; $109B,3 |
||
1382 | endif |
||
1383 | cmpy DirectWord ; $109C,3 |
||
1384 | ldy DirectWord ; $109E,3 |
||
1385 | sty DirectWord ; $109F,3 |
||
1386 | |||
1387 | ; ----------------------------------------------------------------------- |
||
1388 | |||
1389 | ifdef __6309__ |
||
1390 | subw ,w++ ; $10A0,3+ |
||
1391 | cmpw ,w++ ; $10A1,3+ |
||
1392 | sbcd ,w++ ; $10A2,3+ |
||
1393 | endif |
||
1394 | cmpd ,--x ; $10A3,3+ |
||
1395 | ifdef __6309__ |
||
1396 | andd ,w++ ; $10A4,3+ |
||
1397 | bitd ,w++ ; $10A5,3+ |
||
1398 | ldw ,w++ ; $10A6,3+ |
||
1399 | stw ,w++ ; $10A7,3+ |
||
1400 | eord ,w++ ; $10A8,3+ |
||
1401 | adcd ,w++ ; $10A9,3+ |
||
1402 | ord ,w++ ; $10AA,3+ |
||
1403 | addw ,w++ ; $10AB,3+ |
||
1404 | endif |
||
1405 | cmpy ,--x ; $10AC,3+ |
||
1406 | ldy ,--x ; $10AE,3+ |
||
1407 | sty ,--x ; $10AF,3+ |
||
1408 | |||
1409 | ; ----------------------------------------------------------------------- |
||
1410 | |||
1411 | ifdef __6309__ |
||
1412 | subw $7000 ; $10B0,4 |
||
1413 | cmpw $7000 ; $10B1,4 |
||
1414 | sbcd $7000 ; $10B2,4 |
||
1415 | endif |
||
1416 | cmpd $7000 ; $10B3,4 |
||
1417 | ifdef __6309__ |
||
1418 | andd $7000 ; $10B4,4 |
||
1419 | bitd $7000 ; $10B5,4 |
||
1420 | ldw $7000 ; $10B6,4 |
||
1421 | stw $7000 ; $10B7,4 |
||
1422 | eord $7000 ; $10B8,4 |
||
1423 | adcd $7000 ; $10B9,4 |
||
1424 | ord $7000 ; $10BA,4 |
||
1425 | addw $7000 ; $10BB,4 |
||
1426 | endif |
||
1427 | cmpy $7000 ; $10BC,4 |
||
1428 | ldy $7000 ; $10BE,4 |
||
1429 | sty $7000 ; $10BF,4 |
||
1430 | |||
1431 | ; ----------------------------------------------------------------------- |
||
1432 | |||
1433 | lds #12345 ; $10CE,4 |
||
1434 | |||
1435 | ifdef __6309__ |
||
1436 | ldq DirectLong ; $10DC,3 |
||
1437 | stq DirectLong ; $10DD,3 |
||
1438 | endif |
||
1439 | lds DirectWord ; $10DE,3 |
||
1440 | sts DirectWord ; $10DF,3 |
||
1441 | |||
1442 | ifdef __6309__ |
||
1443 | ldq ,x ; $10EC,3+ |
||
1444 | stq ,x ; $10ED,3+ |
||
1445 | endif |
||
1446 | lds ,x ; $10EE,3+ |
||
1447 | sts ,x ; $10EF,3+ |
||
1448 | |||
1449 | ifdef __6309__ |
||
1450 | ldq AddressFour ; $10FC,4 |
||
1451 | stq AddressFour ; $10FD,4 |
||
1452 | endif |
||
1453 | lds AddressFour ; $10FE,4 |
||
1454 | sts AddressFour ; $10FF,4 |
||
1455 | |||
1456 | ; +---------------------------------------------------------------------+ |
||
1457 | ; | | |
||
1458 | ; | Instructions with prefix byte $11. | |
||
1459 | ; | | |
||
1460 | ; +---------------------------------------------------------------------+ |
||
1461 | |||
1462 | ifdef __6309__ |
||
1463 | band a.7,DirectByte.0 ; $1130,4 |
||
1464 | biand b.6,DirectByte.1 ; $1131,4 |
||
1465 | bor cc.5,DirectByte.2 ; $1132,4 |
||
1466 | bior a.4,DirectByte.3 ; $1133,4 |
||
1467 | beor b.3,DirectByte.4 ; $1134,4 |
||
1468 | bieor cc.2,DirectByte.5 ; $1135,4 |
||
1469 | ldbt ccr.1,DirectByte.6 ; $1136,4 |
||
1470 | stbt ccr.0,DirectByte.7 ; $1137,4 |
||
1471 | |||
1472 | tfr x+,y+ ; $1138,3 |
||
1473 | tfm x+,y+ ; alternate |
||
1474 | tfr u-,x- ; $1139,3 |
||
1475 | tfm u-,x- ; alternate |
||
1476 | tfr s+,x ; $113A,3 |
||
1477 | tfm s+,x ; alternate |
||
1478 | tfr x,y+ ; $113B,3 |
||
1479 | tfm x,y+ ; alternate |
||
1480 | bitmd #128 ; $113C,3 |
||
1481 | ldmd #1 ; $113D,3 |
||
1482 | endif |
||
1483 | swi3 ; $113F,2 |
||
1484 | swi 3 ; alternate |
||
1485 | |||
1486 | ; ----------------------------------------------------------------------- |
||
1487 | |||
1488 | ifdef __6309__ |
||
1489 | come ; $1143,2 |
||
1490 | dece ; $114A,2 |
||
1491 | ince ; $114C,2 |
||
1492 | tste ; $114D,2 |
||
1493 | clre ; $114F,2 |
||
1494 | |||
1495 | comf ; $1153,2 |
||
1496 | decf ; $115A,2 |
||
1497 | incf ; $115C,2 |
||
1498 | tstf ; $115D,2 |
||
1499 | clrf ; $115F,2 |
||
1500 | endif |
||
1501 | |||
1502 | ; ----------------------------------------------------------------------- |
||
1503 | |||
1504 | ifdef __6309__ |
||
1505 | sube #123 ; $1180,3 |
||
1506 | cmpe #123 ; $1181,3 |
||
1507 | endif |
||
1508 | cmpu #12345 ; $1183,4 |
||
1509 | ifdef __6309__ |
||
1510 | lde #123 ; $1186,3 |
||
1511 | adde #123 ; $118B,3 |
||
1512 | endif |
||
1513 | cmps #12345 ; $118C,4 |
||
1514 | ifdef __6309__ |
||
1515 | divd #123 ; $118D,3 |
||
1516 | divq #12345 ; $118E,4 |
||
1517 | muld #12345 ; $118F,4 |
||
1518 | endif |
||
1519 | |||
1520 | ; ----------------------------------------------------------------------- |
||
1521 | |||
1522 | ifdef __6309__ |
||
1523 | sube DirectByte ; $1190,3 |
||
1524 | cmpe DirectByte ; $1191,3 |
||
1525 | endif |
||
1526 | cmpu DirectWord ; $1193,3 |
||
1527 | ifdef __6309__ |
||
1528 | lde DirectByte ; $1196,3 |
||
1529 | ste DirectByte ; $1197,3 |
||
1530 | adde DirectByte ; $119B,3 |
||
1531 | endif |
||
1532 | cmps DirectWord ; $119C,3 |
||
1533 | ifdef __6309__ |
||
1534 | divd DirectWord ; $119D,3 |
||
1535 | divq DirectWord ; $119E,3 |
||
1536 | muld DirectWord ; $119F,3 |
||
1537 | endif |
||
1538 | |||
1539 | ; ----------------------------------------------------------------------- |
||
1540 | |||
1541 | ifdef __6309__ |
||
1542 | sube ,s+ ; $11A0,3+ |
||
1543 | cmpe ,s+ ; $11A1,3+ |
||
1544 | endif |
||
1545 | cmpu ,s++ ; $11A3,3+ |
||
1546 | ifdef __6309__ |
||
1547 | lde ,s+ ; $11A6,3+ |
||
1548 | ste ,s+ ; $11A7,3+ |
||
1549 | adde ,s+ ; $11AB,3+ |
||
1550 | endif |
||
1551 | cmps ,s++ ; $11AC,3+ |
||
1552 | ifdef __6309__ |
||
1553 | divd ,s+ ; $11AD,3+ |
||
1554 | divq ,s++ ; $11AE,3+ |
||
1555 | muld ,s++ ; $11AF,3+ |
||
1556 | endif |
||
1557 | |||
1558 | ; ----------------------------------------------------------------------- |
||
1559 | |||
1560 | ifdef __6309__ |
||
1561 | sube $9000 ; $11B0,4 |
||
1562 | cmpe $9000 ; $11B1,4 |
||
1563 | endif |
||
1564 | cmpu $9000 ; $11B3,4 |
||
1565 | ifdef __6309__ |
||
1566 | lde $9000 ; $11B6,4 |
||
1567 | ste $9000 ; $11B7,4 |
||
1568 | adde $9000 ; $11BB,4 |
||
1569 | endif |
||
1570 | cmps $9000 ; $11BC,4 |
||
1571 | ifdef __6309__ |
||
1572 | divd $9000 ; $11BD,4 |
||
1573 | divq $9000 ; $11BE,4 |
||
1574 | muld $9000 ; $11BF,4 |
||
1575 | endif |
||
1576 | |||
1577 | ; ----------------------------------------------------------------------- |
||
1578 | |||
1579 | ifdef __6309__ |
||
1580 | subf #123 ; $11C0,3 |
||
1581 | cmpf #123 ; $11C1,3 |
||
1582 | ldf #123 ; $11C6,3 |
||
1583 | addf #123 ; $11CB,3 |
||
1584 | endif |
||
1585 | |||
1586 | ; ----------------------------------------------------------------------- |
||
1587 | |||
1588 | ifdef __6309__ |
||
1589 | subf DirectByte ; $11D0,3 |
||
1590 | cmpf DirectByte ; $11D1,3 |
||
1591 | ldf DirectByte ; $11D6,3 |
||
1592 | stf DirectByte ; $11D7,3 |
||
1593 | addf DirectByte ; $11DB,3 |
||
1594 | |||
1595 | subf ,s+ ; $11E0,3+ |
||
1596 | cmpf ,s+ ; $11E1,3+ |
||
1597 | ldf ,s+ ; $11E6,3+ |
||
1598 | stf ,s+ ; $11E7,3+ |
||
1599 | addf ,s+ ; $11EB,3+ |
||
1600 | |||
1601 | subf $9000 ; $11F0,4 |
||
1602 | cmpf $9000 ; $11F1,4 |
||
1603 | ldf $9000 ; $11F6,4 |
||
1604 | stf $9000 ; $11F7,4 |
||
1605 | addf $9000 ; $11FB,4 |
||
1606 | endif |
||
1607 | |||
1608 | |||
1609 | end Start |
||
1610 | ; ----- EOF ------------------------------------------------------------- |
||
1611 |