예제 #1
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 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
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 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
예제 #3
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def BC(self, value):
     value = Bits.limitTo16Bits(value)
     self.regs[B] = value >> 8
     self.regs[C] = Bits.limitTo8Bits(value)
예제 #4
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def DE(self, value):
     value = Bits.limitTo16Bits(value)
     self.regs[D] = value >> 8
     self.regs[E] = Bits.limitTo8Bits(value)
예제 #5
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def DEPrim(self, value):
     value = Bits.limitTo16Bits(value)
     self.regsPri[D] = value >> 8
     self.regsPri[E] = Bits.limitTo8Bits(value)
예제 #6
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def DEPrim(self, value):
     value = Bits.limitTo16Bits(value)
     self.regsPri[D] = value >> 8
     self.regsPri[E] = Bits.limitTo8Bits(value)
예제 #7
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def HLPrim(self, value):
     value = Bits.limitTo16Bits(value)
     self.regsPri[H] = value >> 8
     self.regsPri[L] = Bits.limitTo8Bits(value)
예제 #8
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def AFPrim(self, value):
     value = Bits.limitTo16Bits(value)
     self.regsPri[A] = value >> 8
     self.regsPri[F] = Bits.limitTo8Bits(value)
예제 #9
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def IX(self, value):
     self.ix = Bits.limitTo16Bits(value)
예제 #10
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def IX(self, value):
     self.ix = Bits.limitTo16Bits(value)
예제 #11
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def IY(self, value):
     self.iy = Bits.limitTo16Bits(value)
예제 #12
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def AFPrim(self, value):
     value = Bits.limitTo16Bits(value)
     self.regsPri[A] = value >> 8
     self.regsPri[F] = Bits.limitTo8Bits(value)
예제 #13
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def SP(self, value):
     self.sp = Bits.limitTo16Bits(value)
예제 #14
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def AF(self, value):
     value = Bits.limitTo16Bits(value)
     self.regs[A] = value >> 8
     self.regs[F] = Bits.limitTo8Bits(value)
예제 #15
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def BCPrim(self, value):
     value = Bits.limitTo16Bits(value)
     self.regsPri[B] = value >> 8
     self.regsPri[C] = Bits.limitTo8Bits(value)
예제 #16
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def BC(self, value):
     value = Bits.limitTo16Bits(value)
     self.regs[B] = value >> 8
     self.regs[C] = Bits.limitTo8Bits(value)
예제 #17
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def BCPrim(self, value):
     value = Bits.limitTo16Bits(value)
     self.regsPri[B] = value >> 8
     self.regsPri[C] = Bits.limitTo8Bits(value)
예제 #18
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def PC(self, value):
     self.pc = Bits.limitTo16Bits(value)
예제 #19
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def AF(self, value):
     value = Bits.limitTo16Bits(value)
     self.regs[A] = value >> 8
     self.regs[F] = Bits.limitTo8Bits(value)
예제 #20
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def PC(self, value):
     self.pc = Bits.limitTo16Bits(value)
예제 #21
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def SP(self, value):
     self.sp = Bits.limitTo16Bits(value)
예제 #22
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def HLPrim(self, value):
     value = Bits.limitTo16Bits(value)
     self.regsPri[H] = value >> 8
     self.regsPri[L] = Bits.limitTo8Bits(value)
예제 #23
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def IY(self, value):
     self.iy = Bits.limitTo16Bits(value)
예제 #24
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def DE(self, value):
     value = Bits.limitTo16Bits(value)
     self.regs[D] = value >> 8
     self.regs[E] = Bits.limitTo8Bits(value)
예제 #25
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def HL(self, value):
     value = Bits.limitTo16Bits(value)
     self.regs[H] = value >> 8
     self.regs[L] = Bits.limitTo8Bits(value)
예제 #26
0
파일: cpu.py 프로젝트: pawlos/Timex.Emu
 def HL(self, value):
     value = Bits.limitTo16Bits(value)
     self.regs[H] = value >> 8
     self.regs[L] = Bits.limitTo8Bits(value)