Question
long i,p; #define MAXM 13 long m[MAXM] = { 0x01284820, 0x01495020, 0x022a9020, 0x01284820, 0x01495020, 0x024a9820, 0x01284820, 0x01495020, 0x026aa020, 0x01284820, 0x01495020, 0x028aa820 , 0x1000ffff }; void
long i,p; #define MAXM 13
long m[MAXM] = { 0x01284820, 0x01495020, 0x022a9020, 0x01284820, 0x01495020, 0x024a9820, 0x01284820, 0x01495020, 0x026aa020, 0x01284820, 0x01495020, 0x028aa820 , 0x1000ffff };
void main()
{
p = 0; i = 0;
while(i != 0x1000ffff)
{
i = m[p]; p = p + 1; cout << i << " ";
}
cout << "done"
}
Convert the above C program into MIPS code starting with:
.data strl: .asciiz " " m : 0x01284820, 0x01495020, 0x022a9020, 0x01284820, 0x01495020, 0x024a9820, 0x01284820, 0x01495020, 0x026aa020, 0x01284820, 0x01495020, 0x028aa820, 0x1000ffff .text .globl main main: (MIPS program equivalent to above while loop, etc)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started