1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-11-29 10:50:28 +00:00
6502bench/SourceGen/SGTestData/Expected/2009-branches-and-banks_acme.S
Andy McFadden 4981c3cdbb Fix ACME code gen "overflow"
ACME has a "real" PC and a "pseudo" PC.  The "real" PC determines the
initial position in a 64KB buffer used to hold assembler output.  If
the amount of code generated runs off the end, the assembler fails
with "produced too much code".

The source code generator in SourceGen was outputting a "real" PC
for the first address range and "psuedo" PCs for any address ranges
that followed.  This produced nice results for code with a single
range, but caused problems for multi-range sources if the initial
range was high in memory and a later range was lower in memory.
While the assembler isn't actually generating more than 64KB of code,
ACME's buffer management was detecting an overflow.

Now, if a source file has multiple address ranges, we set the "real"
PC to $0000 and use a "pseudo" PC for all ranges.  Output for projects
with a single address range is unmodified.
2020-05-14 16:37:33 -07:00

9 lines
434 B
ArmAsm

;ACME can't handle 65816 code that lives outside bank zero
* = $0000
!pseudopc $1000 {
!hex 18fbe2304c00002c0000a500a503d0ba30b862b5ff7006826d00000102a51482
!hex a5ff2c80005c0000442cc0ff823d00cf000044af000044ad0000a50030f562b2
!hex ffd0b082a9ff1700170044cfc0ff44f005303c8239005c0020002c0020f41700
!hex f44400d003dc1300ea201220201520200f202256341260
} ;!pseudopc