예제 #1
0
   def writeMov(self, Destination, Source):
      NewInstruction = ImmediateInstruction(ImmediateInstruction.EnumType.MOV, self.ImmediateInstructionCounter)
      NewInstruction.Source      = Source
      NewInstruction.Destination = Destination

      self.ImmCodeData.append(NewInstruction)
      self.ImmediateInstructionCounter += 1
예제 #2
0
   def writeInc(self, Operand, Destination):
      NewInstruction = ImmediateInstruction(ImmediateInstruction.EnumType.INC, self.ImmediateInstructionCounter)
      NewInstruction.Operand     = Operand
      NewInstruction.Destination = Destination

      self.ImmCodeData.append(NewInstruction)
      self.ImmediateInstructionCounter += 1
예제 #3
0
   def writeMul(self, A, B, Destination):
      NewInstruction = ImmediateInstruction(ImmediateInstruction.EnumType.MUL, self.ImmediateInstructionCounter)
      NewInstruction.A = A
      NewInstruction.B = B
      NewInstruction.Destination = Destination

      self.ImmCodeData.append(NewInstruction)
      self.ImmediateInstructionCounter += 1      
예제 #4
0
    def writeInc(self, Operand, Destination):
        NewInstruction = ImmediateInstruction(
            ImmediateInstruction.EnumType.INC,
            self.ImmediateInstructionCounter)
        NewInstruction.Operand = Operand
        NewInstruction.Destination = Destination

        self.ImmCodeData.append(NewInstruction)
        self.ImmediateInstructionCounter += 1
예제 #5
0
    def writeMov(self, Destination, Source):
        NewInstruction = ImmediateInstruction(
            ImmediateInstruction.EnumType.MOV,
            self.ImmediateInstructionCounter)
        NewInstruction.Source = Source
        NewInstruction.Destination = Destination

        self.ImmCodeData.append(NewInstruction)
        self.ImmediateInstructionCounter += 1
예제 #6
0
   def writeAdd(self, A, B, Destination):
      NewInstruction = ImmediateInstruction(ImmediateInstruction.EnumType.ADD, self.ImmediateInstructionCounter)
      NewInstruction.A = A
      NewInstruction.B = B
      NewInstruction.Destination = Destination
      NewInstruction.StaticCarry = False

      self.ImmCodeData.append(NewInstruction)
      self.ImmediateInstructionCounter += 1
예제 #7
0
    def writeMul(self, A, B, Destination):
        NewInstruction = ImmediateInstruction(
            ImmediateInstruction.EnumType.MUL,
            self.ImmediateInstructionCounter)
        NewInstruction.A = A
        NewInstruction.B = B
        NewInstruction.Destination = Destination

        self.ImmCodeData.append(NewInstruction)
        self.ImmediateInstructionCounter += 1
예제 #8
0
    def writeAdd(self, A, B, Destination):
        NewInstruction = ImmediateInstruction(
            ImmediateInstruction.EnumType.ADD,
            self.ImmediateInstructionCounter)
        NewInstruction.A = A
        NewInstruction.B = B
        NewInstruction.Destination = Destination
        NewInstruction.StaticCarry = False

        self.ImmCodeData.append(NewInstruction)
        self.ImmediateInstructionCounter += 1