setReg :: Int -> Int32 -> MipsEnv ()
setReg tr tv = do
  state <- get
  let regs = intRegisters state
  put state { intRegisters = (take tr regs) ++ [tv] ++ (drop (tr+1) regs) }
  return ()
setReg :: Int -> Int32 -> MipsEnv ()
setReg tr tv = do
  state <- get
  let regs = intRegisters state
  put state { intRegisters = (take tr regs) ++ [tv] ++ (drop (tr+1) regs) }
  return ()
setReg tr tv = do
  state <- get
  let regs = intRegisters state
  put state { intRegisters = (take tr regs) ++ [tv] ++ (drop (tr+1) regs) }
  return ()