本文整理汇总了Python中Trace类的典型用法代码示例。如果您正苦于以下问题:Python Trace类的具体用法?Python Trace怎么用?Python Trace使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Trace类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: i_ASZ
def i_ASZ():
global PC
if AC == 0:
PC = (PC + 1) & WORDMASK
Trace.itrace('ASZ')
return 1
示例2: i_ASN
def i_ASN():
global PC
if AC != 0:
PC = (PC + 1) & WORDMASK
Trace.itrace('ASN')
return 1
示例3: i_TSF
def i_TSF():
global PC
if TtyOut.ready():
PC = (PC + 1) & WORDMASK
Trace.itrace('TSF')
return 1
示例4: i_SAR1
def i_SAR1(indirect, address, instruction):
global AC
high_bit = AC & HIGHBITMASK
AC = (AC >> 1) | high_bit
Trace.itrace('SAR', False, 1)
return 1
示例5: i_KSF
def i_KSF():
global PC
if Kbd.ready():
PC = (PC + 1) & WORDMASK
Trace.itrace('KSF')
return 1
示例6: i_RSF
def i_RSF():
global PC
if TtyIn.ready():
PC = (PC + 1) & WORDMASK
Trace.itrace('RSF')
return 1
示例7: i_RRC
def i_RRC(indirect, address, instruction):
global AC
AC |= TtyIn.read()
TtyIn.clear()
Trace.itrace('RRC')
return 1
示例8: i_LSN
def i_LSN():
global PC
if L != 0:
PC = (PC + 1) & WORDMASK
Trace.itrace('LSN')
return 1
示例9: i_SSN
def i_SSN():
global PC
if not Display.ready():
PC = (PC + 1) & WORDMASK
Trace.itrace('SSN')
return 1
示例10: i_KRC
def i_KRC(indirect, address, instruction):
global AC
AC |= Kbd.read()
Kbd.clear()
Trace.itrace('KRC')
return 1
示例11: i_HSF
def i_HSF():
global PC
if Ptr.ready():
PC = (PC + 1) & WORDMASK
Trace.itrace('HSF')
return 1
示例12: i_HSN
def i_HSN():
global PC
if not Ptr.ready():
PC = (PC + 1) & WORDMASK
Trace.itrace('HSN')
return 1
示例13: doDEIMByte
def doDEIMByte(byte):
global DPC, DX, DY, DRSindex
if byte & 0x80: # increment?
prevDX = DX
prevDY = DY
if byte & 0x20:
DX -= (byte & 0x18) >> 3
else:
DX += (byte & 0x18) >> 3
if byte & 0x04:
DY -= (byte & 0x03)
else:
DY += (byte & 0x03)
# if byte & 0x40:
# display.draw(0, prevDX, prevDY, DX, DY)
else: # micro instructions
if byte & 0x40:
mode = MODE_NORMAL
if byte & 0x20: # DRJM
if DRSindex <= 0:
Trace.comment('\nDRS stack underflow at display address %6.6o'
% (DPC - 1))
illegal()
DRSindex -= 1
DPC = DRS[DRSindex]
if byte & 0x10:
DX += 0x08
if byte & 0x08:
DX &= 0xfff8
if byte & 0x02:
DY += 0x10
if byte & 0x01:
DY &= 0xfff0
示例14: page00
def page00(instruction):
if instruction == 000000: # DHLT
i_DHLT()
elif instruction == 004000: # DNOP
Trace.dtrace('DNOP')
elif instruction == 004004: # DSTS 0
i_DSTS(0)
elif instruction == 004005: # DSTS 1
i_DSTS(1)
elif instruction == 004006: # DSTS 2
i_DSTS(2)
elif instruction == 004007: # DSTS 3
i_DSTS(3)
elif instruction == 004010: # DSTB 0
i_DSTB(0)
elif instruction == 004011: # DSTB 1
i_DSTB(1)
elif instruction == 004040: # DRJM
i_DRJM()
elif instruction == 004100: # DDYM
i_DDYM()
elif instruction == 004200: # DDXM
i_DDXM()
elif instruction == 004400: # DIYM
i_DIYM()
elif instruction == 005000: # DIXM
i_DIXM()
elif instruction == 006000: # DHVC
i_DHVC()
else:
illegal(instruction)
return 1
示例15: i_PSF
def i_PSF(indirect, address, instruction):
global PC
if Ptp.ready():
PC = (PC + 1) & WORDMASK
Trace.itrace('PSF')
return 1