[A83] Re: Getting a value from a data table


[Prev][Next][Index][Thread]

[A83] Re: Getting a value from a data table



Thanks! Now how do I get the value from the data table at variable (well 
actually register) coordinates?

ld a,(datatable+(d*5)+e)   ; d = x coordinate, e = y coordinate

Thanks,
Colin Hart
Xempest@aol.com

> 
> That simply loads the memory address of datatable+(4*5)+3 into de, and that
> isn't even the byte of the table that he wants to find.  Try this:
> 
> ld a,(datatable+(3*5)+2)     ;a=byte (4-1),(3-1) or 3, 2
> 
> - - Joe