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


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

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




> >
> >Personally i'd go for
> >ld de, datatable + (4*5) +3  ; start table + ((4)* row length [to select
> 4rth 
> >column]) + 3 
> > 
> >this assumes 0,0 is the origin, not 1,1
> >
> >> so de is now 13, which was at 4,3 in the data table
> >> 

> 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

Ofcourse... 
I thought he wanted the mem address in de to ld from himself

 
> - - Joe
> 
> 
> --------------------------------
> Joe Pemberton
> http://tiworld.calc.org
> --------------------------------
> 
> 
> _____________________________________________
> Free email with personality! Over 200 domains!
> http://www.MyOwnEmail.com
> 
> 
> 





References: