cancel
Showing results for 
Search instead for 
Did you mean: 

ST7 assembler variables

chill_just_chill
Associate II
Posted on May 09, 2003 at 12:20

ST7 assembler variables

2 REPLIES 2
chill_just_chill
Associate II
Posted on May 02, 2003 at 11:45

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!

Christophe
stephanie
Associate II
Posted on May 09, 2003 at 12:20

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!