In this laboratory you will be writing C code to break an input MIPS instruction into its component parts. (It is permissible to use C++ or Java for these assignments.)
/* mipsInstrReg.h: Instruction Register Simulator header file */ void InstrReg(unsigned int IRinstr, unsigned int *op, unsigned int *rs, unsigned int *rt, unsigned int *rd, unsigned int *sh, unsigned int *ft, unsigned int *ai, unsigned int *ta); /* InstrReg: Simulate Instruction Register (break instruction into fields) * Input: * IRinstr: input 32-bit instruction * Outputs: * op: op code, bits 26-31 * rs: read reg #1, bits 21-25 * rt: read reg #2, bits 16-20 * rd: write reg, bits 11-15 * sh: shamt, bits 6-10 * ft: funct, bits 0-5 * ai: addr/immed, bits 0-15 * ta: target addr, bits 0-25 */