Question: What high-level languages call goto is usually called a jump instruction in assembly language. The catch is that you can't have a 6-bit opcode and
What high-level languages call goto is usually called a jump instruction in assembly language. The catch is that you can't have a 6-bit opcode and a 32-bit (immediate) memory address fit in one 32-bit instruction. MIPS handles this a little strangely, so let's make a more normal jump instruction called jump, which takes two words. The first is the instruction with the opcode, the second is just the 32-bit jump target address. Thus, jump 0x12345678 would be encoded as two words: 0x10000000 and 0x12345678. Executing that instruction would make the next instruction be taken from memory address 0x12345678. Add states to the following to implement the jump instruction.
when op() op(32) Jump
Start: PCout, MARin, MEMread, Yin CONST(4), ALUadd, Zin, UNTILmfc MDRout, IRin Zout, PCin, JUMPonop HALT /* Should end here on undecoded op */
Jump: /* YOUR STATES GO HERE! */
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
