when you translated the C-code to assembly in the recitation, you assumed that the desired variable values are stored in the register, before the program is running (e.g. N is in R10).
in the project instructions you wrote that N is stored in the memory in address 100 - how can we load that value to a register of our choice?
are we supposed to use “LW” from address 100 to the register we chose|?
If I may ask another question in the same topic -
In the instructions it is said that the base of the array is stored in address 101, so the next elements in the array must be stored in addresses 102, 103… etc.
Furthermore, we are asked to store the final value of the counter in address 102.
Where are the next elements of the array stored?
Storing the final value at 102 won’t run over previous data?
Correct me if I’m wrong please.
Yes, that is what you need to do.
The base address of the array is stored in address 101.
For example if the number stored at address 101 is 500, then the array starts at address 500.