示例#1
0
文件: alu.py 项目: ekareem/SICXE
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
文件: alu.py 项目: ekareem/SICXE
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
文件: alu.py 项目: ekareem/SICXE
def ld(register: INT, mem: MEMORY, addr, isImmediate=False):
    operand = addr if isImmediate else mem.getword(addr, False)
    register.set(operand)