Question: Convert the following C statements into equivalent MIPS assembly language: a = 50; b = 100; if ((b - 10) >= (a + 3)) C[2]

 Convert the following C statements into equivalent MIPS assembly language: a
= 50; b = 100; if ((b - 10) >= (a +

Convert the following C statements into equivalent MIPS assembly language: a = 50; b = 100; if ((b - 10) >= (a + 3)) C[2] = a - b; b = a - 5; else a = 30 D[i]; b = a -- 1; Assume that the variables a, b, and i are assigned to registers $80, $sl and Ss2 and the base address of arrays C and D are stored in registers $6 and $s7 respectively. ada dis MIPS Instructions and the corresponding opcodes Mnemonic Meaning Type Opcode Function Instruction Operation Add R Ox00 0x30 add Sd, Ss, St Sd=$s+ St sub Subtract R 0x00 0x22 sub Sd, Ss St Sd=Ss - St mult Multiply R Ox00 Ox18 mult Ss, St hi:lo Ss St Divide R 0x00 Ox1A diy Ss, St lo = Ss St, hiSsSt and Bitwise AND R Ox00 0x234 and Sd, Ss, St Sd=Ss & St Bitwise OR R 0x00 0x25 or Sd, Ss. St Sd Ss St Bitwise XOR (Exlusive OR) R 0x00 0x26 xor Sd, Ss St Sd=SsSt Bitwise NOR (NOT OR) R 0x00 0x27 nor Sd, Ss St sd-(SS) dt Set to lif Less Than R 0x00 0X2A sit Sd. Ss, St sd (SsSt) jr Jump to address in Register 0x00 OxOS jr Ss pe=Ss Logical Shift Let R 0x00 Ox00 sil Sd, St, a sd Stoca si Logical Shift Right (0-Extended) R Ox00 0x02 al Sd, St, a SdSt >> or xor nor addi Add Immediate 1 Ox08 NA addi St. Ss i St-SsSEO andi Bitwise AND Immediate 1 Oxoc NA andi St, Ss i St=Ss & ZE(1) ori Bitwise OR Immediate 1 OxOD NA ori St, Ss, 1 St=SIZE(D) Load Word 1 0x23 NA Iw St, (S) St MEMS8+ i]:4 Store Word 1 0x2B NA Sw St, (S) MEMISs + i]:4 = St silti Set to 1 if Less Than Immediate 1 OXOA NA siti St, Ss, 1 St=(SsSE (1) be Branch if Equal I 0x04 NA beqSs St, labdi (Ss = St) pete i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!