本文整理汇总了Python中Trace.trace方法的典型用法代码示例。如果您正苦于以下问题:Python Trace.trace方法的具体用法?Python Trace.trace怎么用?Python Trace.trace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Trace
的用法示例。
在下文中一共展示了Trace.trace方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: execute_once
# 需要导入模块: import Trace [as 别名]
# 或者: from Trace import trace [as 别名]
def execute_once():
if traceend is None:
if MainCPU.PC == tracestart:
Trace.settrace(True)
else:
Trace.settrace(MainCPU.PC >= tracestart and MainCPU.PC <= traceend)
if DisplayCPU.ison():
Trace.trace('%6.6o' % DisplayCPU.DPC)
Trace.trace('\t')
instruction_cycles = DisplayCPU.execute_one_instruction()
Trace.trace('%6.6o\t' % MainCPU.PC)
instruction_cycles += MainCPU.execute_one_instruction()
Trace.itraceend(DisplayCPU.ison())
__tick_all(instruction_cycles)
if not DisplayCPU.ison() and not MainCPU.running:
return 0
return instruction_cycles
示例2: execute_one_instruction
# 需要导入模块: import Trace [as 别名]
# 或者: from Trace import trace [as 别名]
def execute_one_instruction():
global DPC
if not running:
Trace.dtrace('')
return 0
instruction = Memory.get(DPC, 0)
DPC = MASK_MEM(DPC + 1)
if mode == MODE_DEIM:
Trace.trace(DEIMdecode(instruction >> 8) + '\t')
doDEIMByte(instruction >> 8)
if mode == MODE_DEIM:
Trace.trace(DEIMdecode(instruction & 0xff) + '\t')
doDEIMByte(instruction & 0xff)
else:
Trace.trace('\t')
return 1
opcode = instruction >> 12
address = instruction & 007777
if opcode == 000: return page00(instruction)
elif opcode == 001: return i_DLXA(address)
elif opcode == 002: return i_DLYA(address)
elif opcode == 003: return i_DEIM(address)
elif opcode == 004: return i_DLVH(address)
elif opcode == 005: return i_DJMS(address)
elif opcode == 006: return i_DJMP(address)
elif opcode == 007: return illegal(instruction)
else: illegal(instruction)