def jal(dest): return pips.iformat(opcode='j', link=True, r0='$ra', r1='$zero', imm=dest)
def xori(dest, op1, immediate): return pips.iformat(opcode='xor', r0=dest, r1=op1, imm=immediate)
def jump_link(label): return pips.iformat(opcode='j', r0='$ra', r1='$zero', imm=label, link=True)
def jal(immediate): return pips.iformat(opcode='j', r0='$ra', r1='$zero', imm=immediate, link=True)
def sb(operand1, immediate, operand2): return pips.iformat(opcode='sb', r0=operand1, r1=operand2, imm=immediate)
def lw(dest, immediate): return pips.iformat(opcode='lw', r0=dest, r1=immediate, imm=immediate)
def nori(dest, operand1, immediate): return pips.iformat(opcode='nor', r0=dest, r1=operand1, imm=immediate)
def bne(op1, op2, dest): return pips.iformat(opcode='bne', r0=op1, r1=op2, imm=dest)
def lb(dest, immediate, op1): return pips.iformat(opcode='lb', r0=dest, r1=op1, imm=immediate)
def store_word(read, offset, addr): return pips.iformat(opcode='sw', r0=read, r1=addr, imm=offset)
def store_byte(read, offset, addr): return pips.iformat(opcode='sb', r0=read, r1=addr, imm=offset)
def load_byte(write, offset, addr): return pips.iformat(opcode='lb', r0=write, r1=addr, imm=offset)
def load_word(write, offset, addr): return pips.iformat(opcode='lw', r0=write, r1=addr, imm=offset)
def bne(op1, op2, label): return pips.iformat(opcode='bne', r0=op1, r1=op2, imm=label)
def beq(operand1, operand2, dest): return pips.iformat(opcode='bne', r0=operand1, r1=operand2, imm=dest)
def sw(dest, immediate, op1): return pips.iformat(opcode='sw', r0=dest, r1=op1, imm=immediate)
def lb(dest, immediate): return pips.iformat(opcode='lb', r0=dest, r1='$sp', imm=immediate)
def sb(dest, immediate, operand1): return pips.iformat(opcode='sb', r0=dest, r1=operand1, imm=immediate)
def andi(dest, operand1, immediate): return pips.iformat(opcode='and', r0=dest, r1=operand1, imm=immediate)
def not_instr(dest, op1): return pips.iformat(opcode='xor', r0=dest, r1=op1, imm=65535)
def j(immediate): return pips.iformat(opcode='j', r0='$zero', r1='$zero', imm=immediate)
def nop(): return pips.iformat(opcode='add', r0='$zero', r1='$zero', imm=0)
def beq(operand1, operand2, immediate): return pips.iformat(opcode='bne', r0=operand1, r1=operand2, imm=immediate)
def sltui(dest, operand1, immediate): return pips.iformat(opcode='sltu', r0=dest, r1=operand1, imm=immediate)
def nandi(dest, op1, immediate): return pips.iformat(opcode='nand', r0=dest, r1=op1, imm=immediate)
def j(dest): return pips.iformat(opcode='j', r0='$zero', r1='$zero', imm=dest)
def slti(dest, op1, immediate): return pips.iformat(opcode='slt', r0=dest, r1=op1, imm=immediate)
def jump(label): return pips.iformat(opcode='j', r0='$zero', r1='$zero', imm=label)