Hi there, I'm trying to assemble a small test program and I'm getting an overflow error on loading X with a 16 bit value in xa, or comparing it with a 16bit value.
I'm using the "-w" option to enable 65816 mode, and the ".xl" pseudo opcode to tell the assembler to run in wide index register mode.
Code:
*=$f000
vreset
; init the CPU
sei
cld
ldx #$ff
txs
; switch to native mode
clc
xce
; set ac to single byte ...
sep #%00100000
; ... and tell the assembler about it
.as
; set X/Y registers to 16 bit ...
rep #%00010000
; ... and tell the assembler about it
.xl
; -----------------------
; copy over charrom to RAM
lda #0
ldx #4095
copy
lda $00e000,x ; location in test ROM bank
sta $07c000,x ; location in RAM - uppermost RAM bank
dex
bpl copy
...
However, when I try to build it, I get
Code:
xa -w -o romtest02 romtest02.a65
ldx #4095
romtest02.a65:line 37: f00f:Overflow error
cpx #$c000
romtest02.a65:line 51: f022:Overflow error
cpx #2000
romtest02.a65:line 59: f02d:Overflow error
Break after 3 errors
Anyone knows what's going on here?
That's on xa-2.3.11
Thanks!
_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content:
http://6502.org/users/andre/