Assembly language

Hi experts,

        I need an explination of the difference between store word and store byte in assembly language. I know that with normal variables i can use the store word command to store a register value to a physical address. i.e.
                             LDI         R7, 3                // Load imediately the value 3 to register 7

                             STW      R7, MINS          // Store word the value of R7 to addressrepresented                      
                                                                  // by MINS

But what about indexed addressing;

                          LDI        R7, 3                   // get subscript
                     LDB       R5, ARRAY, R7  // = ARRAY[3]
So here the indexed value of ARRAY[3] is stored in R5. But how do i store the value of 5 to that indexed memory location? Is it;
                         LDI      R2, 5
                         STB     R5,0,R2

If anyone knows what im talking about here please help me. P.S. i know the syntax may not be typical as it is for a teaching assembly language ERICA which isnt widely known but i guess if your familiar with traditional assembly languages you'll know what im talking about.

Thanks, Chris.    
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I think that you'd get a much faster, and better solution if you asked this question in the Assembly Language section.

Request a move to there in the Community Support.

   LDI       R7, 3                 // get subscript
   LDB      R5, ARRAY, R7  // R5 <- ARRAY[3]
Then to store 5 -> ARRAY[4] (let's take 4, because you didn't mention)
   LDI       R7, 4
   LDI       R5, 5
   STB      R5, ARRAY, R7

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
icb01co1Author Commented:
Ok one more thing would;

  LDI       R7, 3                 // get subscript
  LDB      R5, ARRAY, R7  // R5 <- ARRAY[3]

Store the address location of ARRAY[3] in R5 or the actual value.

In other words if

ARRAY[3] = 4;

Would R5 hold the value 3 or the address location? If it hold the address location how do i access the value? Would it be like this?

  LDI       R7, 3                 // get subscript
  LDB      R5, ARRAY, R7  // R5 <- ARRAY[3]
  LDW     R2, R5            // R2 <-4

icb01co1Author Commented:
Sorry mis type i meant .

** rest of question **

Would R5 hold the value 4  or the address location? If it hold the address location how do i access the value? Would it be like this?

** rest of question **

I think that
  LDW     R2, R5            
is OR
1) illegal command
2) it will load to R2 word from address: [0 + R5] = 4
3) it is equal to MOV R2, R5 and R2 <- 4
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.