Re: A86: Element extraction


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

Re: A86: Element extraction




from a list:
load var name to op1
call findsym
ld a,b
(you should store ade someplace if you use this var a lot so you can skip
findsym later)
load index to hl
call _GETLTOOP1 (use _PUTTOL to store op1 to that index)

from a matrix:
get address of matrix in ade (as above)
load row,col to b,c
call _GETMTOOP1 (_PUTTOMA1 to store)

_ADRMROW & _ADRMELE can be used if you just want the address in a matrix
(eg, if you're gonna read&write the same item)
_ADRLELE for address in list

-josh

On Sun, 1 Oct 2000 14:16:00 -0400 (EDT) Jason Shirey
<shiwokarauotoko@juno.com> writes:
> 
> How does one access the data in arrayed variables in an assembly 
> program?
> Say, for example, I had x={1,2,3,4,5} and x loaded up into op1: how 
> would I
> extract x[[2]]? Does it extend to extracting x[[1,1]] if 
> x=[[1,2][3,4]] with
> x, again, loaded into op1?
> 
> 
> 
> 
> 


________________________________________________________________
YOU'RE PAYING TOO MUCH FOR THE INTERNET!
Juno now offers FREE Internet Access!
Try it today - there's no risk!  For your FREE software, visit:
http://dl.www.juno.com/get/tagj.