Should we declare three register for each array?

34 views
Skip to first unread message

aaron171091

unread,
Oct 25, 2016, 9:21:33 PM10/25/16
to SJSUcmpe120
Should we declare three register for each array? 
14859584_10206790391832596_724078327_o.jpg

Frank (sjsu) Lin

unread,
Oct 25, 2016, 11:29:46 PM10/25/16
to aaron lee, SJSUcmpe120

Don't understand the question, please elaborate.


On Oct 25, 2016 6:21 PM, "aaron171091" <aaron...@gmail.com> wrote:
Should we declare three register for each array? 

--
You received this message because you are subscribed to the Google Groups "SJSUcmpe120" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sjsucmpe120+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

aaron171091

unread,
Oct 25, 2016, 11:57:34 PM10/25/16
to SJSUcmpe120
In the picture, i have two version of indirect addressing. I am not sure which one is correct. The question has int A[], B[], C[]. In assembly, how many register do we need to represent for three different array. All array has the same length. So do we need to declare each length for each array ? 

Frank (sjsu) Lin

unread,
Oct 26, 2016, 12:20:35 PM10/26/16
to aaron lee, SJSUcmpe120
Just like programming, there could be many ways of doing the same thing.  For me, I will use three Reg for three arrays and use another register for index.  It should be very similar to the example on the class addressing mode note.

--
Reply all
Reply to author
Forward
0 new messages