当前位置: 首页>>代码示例>>Python>>正文


Python Memory.get方法代码示例

本文整理汇总了Python中Memory.get方法的典型用法代码示例。如果您正苦于以下问题:Python Memory.get方法的具体用法?Python Memory.get怎么用?Python Memory.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Memory的用法示例。


在下文中一共展示了Memory.get方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: i_SAM

# 需要导入模块: import Memory [as 别名]
# 或者: from Memory import get [as 别名]
def i_SAM(indirect, address, instruction):
    global PC

    samaddr = EFFADDR(address)
    if indirect:
        samaddr = Memory.get(samaddr, False)
    if AC == Memory.get(samaddr, False):
        PC = (PC + 1) & PCMASK
    Trace.itrace('SAM', indirect, address)
    return 3 if indirect else 2
开发者ID:Goku0858756,项目名称:rzzzwilson,代码行数:12,代码来源:MainCPU.py

示例2: i_XAM

# 需要导入模块: import Memory [as 别名]
# 或者: from Memory import get [as 别名]
def i_XAM(indirect, address, instruction):
    global AC

    if indirect:
        address = Memory.get(address, False)
    tmp = Memory.get(address, False)
    Memory.put(AC, address, False)
    AC = tmp
    Trace.itrace('XAM', indirect, address)
    return 3 if indirect else 2
开发者ID:Goku0858756,项目名称:rzzzwilson,代码行数:12,代码来源:MainCPU.py

示例3: i_ISZ

# 需要导入模块: import Memory [as 别名]
# 或者: from Memory import get [as 别名]
def i_ISZ(indirect, address, instruction):
    global PC

    value = (Memory.get(address, indirect) + 1) & WORDMASK
    Memory.put(value, address, indirect)
    if value == 0:
        PC = (PC + 1) & WORDMASK
    Trace.itrace('ISZ', indirect, address)
    return 3 if indirect else 2
开发者ID:Goku0858756,项目名称:rzzzwilson,代码行数:11,代码来源:MainCPU.py

示例4: i_JMP

# 需要导入模块: import Memory [as 别名]
# 或者: from Memory import get [as 别名]
def i_JMP(indirect, address, instruction):
    global PC

    jmpaddr = EFFADDR(address)
    if indirect:
        jmpaddr = Memory.get(jmpaddr, False)
    PC = jmpaddr & PCMASK
    Trace.itrace('JMP', indirect, address)
    return 3 if indirect else 2
开发者ID:Goku0858756,项目名称:rzzzwilson,代码行数:11,代码来源:MainCPU.py

示例5: i_SUB

# 需要导入模块: import Memory [as 别名]
# 或者: from Memory import get [as 别名]
def i_SUB(indirect, address, instruction):
    global AC, L

    effaddr = EFFADDR(address)
    AC -= Memory.get(address, indirect)
    if AC & OVERFLOWMASK:
        L = not L
        AC &= WORDMASK
    Trace.itrace('SUB', indirect, address)
    return 3 if indirect else 2
开发者ID:Goku0858756,项目名称:rzzzwilson,代码行数:12,代码来源:MainCPU.py

示例6: i_JMS

# 需要导入模块: import Memory [as 别名]
# 或者: from Memory import get [as 别名]
def i_JMS(indirect, address, instruction):
    global PC

    jmsaddr = EFFADDR(address)
    if indirect:
        jmsaddr = Memory.get(jmsaddr, False)
    Memory.put(PC, jmsaddr, False)
    PC = (jmsaddr + 1) & PCMASK
    Trace.itrace('JMS', indirect, address)
    return 3 if indirect else 2
开发者ID:Goku0858756,项目名称:rzzzwilson,代码行数:12,代码来源:MainCPU.py

示例7: execute_one_instruction

# 需要导入模块: import Memory [as 别名]
# 或者: from Memory import get [as 别名]
def execute_one_instruction():
    """Execute one MAIN instruction, return # cycles used"""

    global PC, BlockBase

    if not running:
        return 0

    # get instruction word to execute, advance PC
    instruction = Memory.get(PC, False)
    BlockBase = PC & ADDRHIGHMASK
    PC = MASK_MEM(PC + 1)

    # get instruction opcode, indirect bit and address
    opcode = (instruction >> 11) & 017
    indirect = (instruction & 0100000)
    address = (instruction & 03777)

    return main_decode.get(opcode, illegal)(indirect, address, instruction)
开发者ID:Goku0858756,项目名称:rzzzwilson,代码行数:21,代码来源:MainCPU.py

示例8: i_LAC

# 需要导入模块: import Memory [as 别名]
# 或者: from Memory import get [as 别名]
def i_LAC(indirect, address, instruction):
    global AC

    AC = Memory.get(address, indirect)
    Trace.itrace('LAC', indirect, address)
    return 3 if indirect else 2
开发者ID:Goku0858756,项目名称:rzzzwilson,代码行数:8,代码来源:MainCPU.py

示例9: i_XOR

# 需要导入模块: import Memory [as 别名]
# 或者: from Memory import get [as 别名]
def i_XOR(indirect, address, instruction):
    global AC

    AC ^= Memory.get(address, indirect)
    Trace.itrace('XOR', indirect, address)
    return 3 if indirect else 2
开发者ID:Goku0858756,项目名称:rzzzwilson,代码行数:8,代码来源:MainCPU.py

示例10: i_AND

# 需要导入模块: import Memory [as 别名]
# 或者: from Memory import get [as 别名]
def i_AND(indirect, address, instruction):
    global AC

    AC &= Memory.get(address, indirect)
    Trace.itrace('AND', indirect, address)
    return 3 if indirect else 2
开发者ID:Goku0858756,项目名称:rzzzwilson,代码行数:8,代码来源:MainCPU.py


注:本文中的Memory.get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。