Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Assembly Language Programming (ALP) Forum (http://www.go4expert.com/forums/assembly-language-programming-forum/)
-   -   Beginner needs help - accessing an array (http://www.go4expert.com/forums/beginner-help-accessing-array-t20895/)

AssemblerJoe 7Feb2010 12:01

Beginner needs help - accessing an array
 
Hello. I want to access a part of an array while only knowing it's start location in memory. As an example, say I want to access joe[2] when joe[] starts at memory cell 5,000. I need to do something like this:

lw $t0, 8(5000)

but am unsure of the exact syntax from knowing that the parentathes must contain a register. I dont know how to find the name of the register in memory at 5,000, so I'm currently stuck with:

lw, $t0, 8(?)

Please help. Thank you.

virxen 16Feb2010 03:30

Re: Beginner needs help - accessing an array
 
i think you want this one

lw $t0,5000($0)


All times are GMT +5.5. The time now is 21:55.