def comprm(register: INT, sw: INT, mem: MEMORY, addr, isImmediate=False): operand = addr if isImmediate else mem.getword(addr, True) cc = SICXE_CC_GT if register > operand else SICXE_CC_LT if register < operand else SICXE_CC_EQ sw.setbits(cc, (6, 8), BIG)
def addrm(register: INT, mem: MEMORY, addr, isImmediate=False): operand = addr if isImmediate else mem.getword(addr, True) register.add(operand, setSelf=True)
def ld(register: INT, mem: MEMORY, addr, isImmediate=False): operand = addr if isImmediate else mem.getword(addr, False) register.set(operand)