2003-05-09 03:20 AM
2003-05-02 02:45 AM
Hello,
In ROM I have declared an array somewhere: .LED DC.B $A6,$FF,$01,... Instead of using: clr Y ld A,(LED,Y) I want to use ld A,(var,Y) So I want to copy the adress of LED into a 16bit variable. How can I do that + declare that variable? tia! Christophe2003-05-09 03:20 AM
I'm not sure to understand what you wanna do...
If LED is declared in ROM (and that's the case apparently), you won't be able to midify its content. If you want to access some elements of this table, you can do it directly: ld A,(LED,X) or if you want to get the address of LED: .LED DC.B $AA,$BB,$CC .ptr DC.B LED PTR will contain LED address. When doubting, do not hesitate to use the simulator and to try different syntaxes!