A bit of advice if you please...
What's the typical way of setting up a pointer to a 24-bit address? I'm using the following method, which works well enough as far as I can tell, but I can't help but think there's a more elegant way of doing it.
Using WLA DX:
Code: Select all
lda #my_data_table ; This resides at 01B820 in the ROM
sta my_pointer ; Load offset of data into pointer. Pointer value = $20 $B8, so far so good.
lda #:my_data_table ; Get bank # of data
sta my_pointer + 2 ; Tack it onto the pointer, pointer now = $20 $B8 $01, great!
ldy #0
lda [my_pointer], y
sta my_variable ; Works! But is there a more elegant way of setting up the pointer?