1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-10-25 10:24:27 +00:00
6502bench/SourceGen/SGTestData/Expected/20052-branches-and-banks_acme.S
Andy McFadden 478afa542e Fix 64tass code gen corner case
On the 65816, if you say "JSR foo" from bank $12, but "foo" is an
address in bank 0, most assemblers will conclude that you're forming
a 16-bit argument with a 16-bit address and assemble happily.  64tass
halts with an error.  Up until v1.55 or so, you could fake it out
by supplying a large offset.

This no longer works.  The preferred way to say "no really I mean to
do this" is to append ",k" to the operand.  We now do that as needed.

I didn't want to define a new ExpressionMode for 64tass just to
support an operand modifier that should probably never actually get
generated (you can't call across banks with JSR!), so this is
implemented with a quirk and an op flag.

64tass v1.56.2625 is now the default.

(issue #104)
2021-08-09 14:11:15 -07:00

14 lines
813 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 7d3254eaea60200e20eac23008a90000e230a90028a9eaeae23008a900c230a9
!hex 000028a9eaeac230eaad0e20ad2220200e20202220fc0e20d0037c0e2020cbed
!hex adcbedd0037ccbedea6b
} ;!pseudopc