Debian Codegraph @

test/broken6303hack.asm

raw
1 ; See ../src/BUGS for the details. Here's how to use macros
2 ; to work around the issue.
3
4 .processor HD6303
5
6 .mac hack
7 dc.b {1} ; opcode
8 dc.b {2} ; immediate value
9 dc.b {3} ; zero-page address
10 .endm
11
12 .mac aimd
13 hack $71,{1},{2}
14 .endm
15
16 .mac aimx
17 hack $61,{1},{2}
18 .endm
19
20 .mac oimd
21 hack $72,{1},{2}
22 .endm
23
24 .mac oimx
25 hack $62,{1},{2}
26 .endm
27
28 .mac eimd
29 hack $75,{1},{2}
30 .endm
31
32 .mac eimx
33 hack $65,{1},{2}
34 .endm
35
36 .mac timd
37 hack $7b,{1},{2}
38 .endm
39
40 .mac timx
41 hack $6b,{1},{2}
42 .endm
43
44 .org $0
45
46 ; the broken DASM versions
47
48 aim $10 ; assembles to 71 10
49 aim $10,x ; assembles to 61 10
50 oim $10 ; assembles to 72 10
51 oim $10,x ; assembles to 62 10
52 eim $10 ; assembles to 75 10
53 eim $10,x ; assembles to 65 10
54 tim $10 ; assembles to 7B 10
55 tim $10,x ; assembles to 6B 10
56
57 ; the fixed macro versions
58
59 aimd $10,$20 ; should be "aim #$10,$20"
60 aimx $10,$20 ; should be "aim #$10,$20,x"
61 oimd $10,$20 ; should be "oim #$10,$20"
62 oimx $10,$20 ; should be "oim #$10,$20,x"
63 eimd $10,$20 ; should be "eim #$10,$20"
64 eimx $10,$20 ; should be "eim #$10,$20,x"
65 timd $10,$20 ; should be "tim #$10,$20"
66 timx $10,$20 ; should be "tim #$10,$20,x"
67
68 .end