This assignment is due in class on 20 October or may be uploaded to Homework 7 on moodle by 2:00 PM on 20 October.
Use the class MIPS32 instruction sheet as your MIPS reference.
Be a human assembler
Translate the following five MIPS instructions into their binary encoding. That’s 160 bits!
lw $t0,vSize initloop: sw $t2,0($t1) add $t2,$t2,$t3 addi $t0,$t0,-1 bne $t0,$0,initloop
Assume that vSize
is located at an offset of
420 bytes from the global pointer, $gp
.
You can figure out the 32 bits for the bne
without
knowing the exact location of initloop
.
The code does nothing useful, so don’t try to figure it out.
Be a human disassembler
Write MIPS assembly language instructions corresponding to the following four 32-bit machine language instructions which has been expressed in hexadecimal.
0FBF0000
23BD0004
03E00008
00000000