Пример #1
0
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)
Пример #2
0
def addrm(register: INT, mem: MEMORY, addr, isImmediate=False):
    operand = addr if isImmediate else mem.getword(addr, True)
    register.add(operand, setSelf=True)
Пример #3
0
def ld(register: INT, mem: MEMORY, addr, isImmediate=False):
    operand = addr if isImmediate else mem.getword(addr, False)
    register.set(operand)