本文整理汇总了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
示例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
示例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
示例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
示例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
示例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
示例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)
示例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
示例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
示例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