本文整理汇总了Python中utility.Bits.limitTo16Bits方法的典型用法代码示例。如果您正苦于以下问题:Python Bits.limitTo16Bits方法的具体用法?Python Bits.limitTo16Bits怎么用?Python Bits.limitTo16Bits使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类utility.Bits
的用法示例。
在下文中一共展示了Bits.limitTo16Bits方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Reg16
# 需要导入模块: from utility import Bits [as 别名]
# 或者: from utility.Bits import limitTo16Bits [as 别名]
def Reg16(self, index, value=None, ix=False, iy=False, af=False):
if value is None:
if index == 0:
return self.BC
elif index == 1:
return self.DE
elif index == 2:
if not ix and not iy:
return self.HL
elif ix:
return self.IX
elif iy:
return self.IY
elif index == 3 and not af:
return self.SP
elif index == 3 and af:
return self.AF
else:
value = Bits.limitTo16Bits(value)
if index == 0:
self.BC = value
return self.BC
elif index == 1:
self.DE = value
return self.DE
elif index == 2:
if not ix and not iy:
self.HL = value
return self.HL
elif ix:
self.IX = value
return self.IX
elif iy:
self.IY = value
return self.IY
elif index == 3 and not af:
self.SP = value
return self.SP
elif index == 3 and af:
self.AF = value
return self.AF
示例2: PC
# 需要导入模块: from utility import Bits [as 别名]
# 或者: from utility.Bits import limitTo16Bits [as 别名]
def PC(self, value):
self.pc = Bits.limitTo16Bits(value)
示例3: IX
# 需要导入模块: from utility import Bits [as 别名]
# 或者: from utility.Bits import limitTo16Bits [as 别名]
def IX(self, value):
self.ix = Bits.limitTo16Bits(value)
示例4: IY
# 需要导入模块: from utility import Bits [as 别名]
# 或者: from utility.Bits import limitTo16Bits [as 别名]
def IY(self, value):
self.iy = Bits.limitTo16Bits(value)
示例5: AFPrim
# 需要导入模块: from utility import Bits [as 别名]
# 或者: from utility.Bits import limitTo16Bits [as 别名]
def AFPrim(self, value):
value = Bits.limitTo16Bits(value)
self.regsPri[A] = value >> 8
self.regsPri[F] = Bits.limitTo8Bits(value)
示例6: SP
# 需要导入模块: from utility import Bits [as 别名]
# 或者: from utility.Bits import limitTo16Bits [as 别名]
def SP(self, value):
self.sp = Bits.limitTo16Bits(value)
示例7: BCPrim
# 需要导入模块: from utility import Bits [as 别名]
# 或者: from utility.Bits import limitTo16Bits [as 别名]
def BCPrim(self, value):
value = Bits.limitTo16Bits(value)
self.regsPri[B] = value >> 8
self.regsPri[C] = Bits.limitTo8Bits(value)
示例8: AF
# 需要导入模块: from utility import Bits [as 别名]
# 或者: from utility.Bits import limitTo16Bits [as 别名]
def AF(self, value):
value = Bits.limitTo16Bits(value)
self.regs[A] = value >> 8
self.regs[F] = Bits.limitTo8Bits(value)
示例9: BC
# 需要导入模块: from utility import Bits [as 别名]
# 或者: from utility.Bits import limitTo16Bits [as 别名]
def BC(self, value):
value = Bits.limitTo16Bits(value)
self.regs[B] = value >> 8
self.regs[C] = Bits.limitTo8Bits(value)
示例10: DEPrim
# 需要导入模块: from utility import Bits [as 别名]
# 或者: from utility.Bits import limitTo16Bits [as 别名]
def DEPrim(self, value):
value = Bits.limitTo16Bits(value)
self.regsPri[D] = value >> 8
self.regsPri[E] = Bits.limitTo8Bits(value)
示例11: DE
# 需要导入模块: from utility import Bits [as 别名]
# 或者: from utility.Bits import limitTo16Bits [as 别名]
def DE(self, value):
value = Bits.limitTo16Bits(value)
self.regs[D] = value >> 8
self.regs[E] = Bits.limitTo8Bits(value)
示例12: HLPrim
# 需要导入模块: from utility import Bits [as 别名]
# 或者: from utility.Bits import limitTo16Bits [as 别名]
def HLPrim(self, value):
value = Bits.limitTo16Bits(value)
self.regsPri[H] = value >> 8
self.regsPri[L] = Bits.limitTo8Bits(value)
示例13: HL
# 需要导入模块: from utility import Bits [as 别名]
# 或者: from utility.Bits import limitTo16Bits [as 别名]
def HL(self, value):
value = Bits.limitTo16Bits(value)
self.regs[H] = value >> 8
self.regs[L] = Bits.limitTo8Bits(value)