I'm porting code to CA65 and have hit a snag.
If I do this;
then try to do this;
I get a "range error" error.
However, doing this;
seems to compile OK. I'm guessing that using the "<" forces it into the correct addressing mode.
My question is, is there a way of defining this behaviour so that I don't have to prepend all my (ZP) addressing with "<"?
Oh, in my .CFG file I have (edited);
If I do this;
Code:
.segment "ZP"
vector:
.res 2
vector:
.res 2
then try to do this;
Code:
lda (vector),y
I get a "range error" error.
However, doing this;
Code:
lda <(vector),y
seems to compile OK. I'm guessing that using the "<" forces it into the correct addressing mode.
My question is, is there a way of defining this behaviour so that I don't have to prepend all my (ZP) addressing with "<"?
Oh, in my .CFG file I have (edited);
Code:
MEMORY
{
ZP: start = $10, size = $F0;
}
SEGMENTS
{
ZEROPAGE: load = ZP, type = zp;
}
{
ZP: start = $10, size = $F0;
}
SEGMENTS
{
ZEROPAGE: load = ZP, type = zp;
}