Question: Hello, I wanted a reference code to work off of because I keep getting stuck. Please in C++ write a partial disassembler for MIPS instructions.
Hello, I wanted a reference code to work off of because I keep getting stuck. Please in C++ write a partial disassembler for MIPS instructions. That is, your input will be the 32-bit machine instructions that a compiler produces. Your program then figures out what the original source instructions were that created those 32-bit machine instructions and outputs them. The possible source instructions that you must be able to disassemble are: add, sub, and, or, slt, lw, sw, beq, bne. Please ignore other MIPS instructions. The specific machine instructions that you will disassemble (one after another in this exact order) are:
0x032BA020, 0x8CE90014, 0x12A90003, 0x022DA822, 0xADB30020, 0x02697824, 0xAE8FFFF4, 0x018C6020, 0x02A4A825, 0x158FFFF7, 0x8ECDFFF0
Your program will then analyze a 32-bit instruction and then print out the assembly language instruction that produced it. Assume that the first instruction begins at address hex 9A040 and the rest follow right after that one. You must output the address along with the instruction. The key is using bitwise AND operations and logical shifts.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
