1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-06 00:28:58 +00:00
6502bench/SourceGen/SGTestData/Expected/20052-branches-and-banks_acme.S
Andy McFadden fdd2bcf847 Fix some 65816 code generation issues
Two basic problems:

(1) cc65, being a one-pass assembler, can't tell if a forward-referenced
label is 16-bit or 24-bit.  If the operand is potentially ambiguous,
such as "LDA label", we need to add an operand width disambiguator.
(The existing tests managed to only do backward references.)

(2) 64tass wants the labels on JMP/JSR absolute operands to have 24-bit
values that match the current program bank.  This is the opposite of
cc65, which requires 16-bit values.  We need to distinguish PBR vs.
DBR instructions (i.e. "LDA abs" vs. "JMP abs") and handle them
differently when formatting for "Common".

Merlin32 doesn't care, and ACME doesn't work at all, so neither of
those needed updating.

The 20052-branches-and-banks test was expanded to cover the problematic
cases.
2020-07-01 17:59:12 -07:00

12 lines
651 B
ArmAsm

;ACME can't handle 65816 code that lives outside bank zero
* = $0000
!pseudopc $1000 {
!hex 18fbe2305c000044000102cf000044af000044ad0000a50030f562b2ffd0b082
!hex a9ff1700170044cfc0ff44f005303c8239005c0020002c0020f41700f44400d0
!hex 03dc0810ea201220201520200f20225634125c103254cf1032548006eaea6016
!hex 3254af163254af7d3254af163254af7d3254ad1732ad1532ad7e32ad7c32ea20
!hex 1632201732201832207d32207e32207f32eaa200fc1932fc7a32206e32207132
!hex 206832206b3220743220773280187c19327c7a326c08106c0810dc0810dc0810
!hex 7d3254eaea60200e206b
} ;!pseudopc