Attempt by: Thursday, September 20, before class
Submit by: Tuesday, September 25, at start of class
PH p. 148, exercises 2.2-2.4.
Write equivalent (MIPS-style) assembly language instructions for the
following C program fragments. (In each case, assume the variables are
associated with registers starting with $s0 and any
temporaries necessary should be stored starting in $t0.)
a = d - (b + c);
e = f + (a - g);
a = d[6] + c;
d[2] = e - f;
x[i+1] = x[i];
Translate the following assembly instructions into machine code
showing both the decimal representaton and the binary
representation. (Follow the example in PH, Section 2.4.)
sub $s0, $t5, $t3
lw $s2, 12($t6)
Translate the following machine instructions into MIPS assembly
instructions.