Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

MIPS Assembly Question

Status
Not open for further replies.

strahd_von_zarovich

Advanced Member level 4
Joined
Sep 25, 2015
Messages
118
Helped
1
Reputation
2
Reaction score
3
Trophy points
1,298
Activity points
2,463
Hi everyone, i have a question below. I will solve the question if I know how to read values from memory. How can I know what are the memory addresses for INIT and MAX or A . I have a plenty of examples in my book but in all questions some information is given like “ A in $s0” or “base address of array is in $s0 so I can get values with load word function and offset : lw $t0, 8($s0)

Give the MIPS assembly code corresponding to the below for- statement. INIT and MAX values must be read from memory. A[ ] array is stored in memory address pointed to by value stored at A.
Sum=0;
for(i=INIT; i<MAX;i++) {
Sum= Sum + A; }
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top