TRSE
TRSE copied to clipboard
Target System: CUSTOM, CPU: 65816 - 24-bit long addressing
I have this variable set up for reading the mouse X position:
var i: integer;
MOUSE_PTR_X_POS: integer at $AF0702;// X Position (0 - 639) (Can only read now) Writing will have no effect
...
begin
i:=MOUSE_PTR_X_POS;
It generates this code:
ldy MOUSE_PTR_X_POS+1 ; LDY $AF0702+1
lda MOUSE_PTR_X_POS; LDA $AF072
The LDY
instruction can't handle a 24-bit operand address and in some cases an assembler might cut off the bank byte leaving LDY $0702
.