Ejemplo n.º 1
0
 public Instruction_Fx65(DecodedInstruction decodedInstruction) : base(decodedInstruction)
 {
     if (Decoded.x == 0)
     {
         Description = $"Fill V0 with value from address I, I+=1.";
     }
     else
     {
         Description = $"Fill V0..V{Decoded.x:X} with values starting from address I, I+={Decoded.x + 1}.";
     }
     Mnemonic = $"LD V{Decoded.x:X}, [I]";
 }
Ejemplo n.º 2
0
 public Instruction_Fx1E(DecodedInstruction decodedInstruction) : base(decodedInstruction)
 {
     Description = $"Set I = I + V{Decoded.x:X}.";
     Mnemonic    = $"ADD I, V{Decoded.x:X}";
 }
Ejemplo n.º 3
0
 public Instruction_8xyE(DecodedInstruction decodedInstruction) : base(decodedInstruction)
 {
     Description = $"Set V{Decoded.x:X} = V{Decoded.y:X}, V{Decoded.x:X} = V{Decoded.x:X} SHL 1. VF = MSB.";
     Mnemonic    = $"SHL V{Decoded.x:X}, V{Decoded.y:X}";
 }
Ejemplo n.º 4
0
 public Instruction_Dxyn(DecodedInstruction decodedInstruction) : base(decodedInstruction)
 {
     Description = $"Draw at (V{Decoded.x:X}, V{Decoded.y:X}) {Decoded.n}-byte sprite from I. VF = collision.";
     Mnemonic    = $"DRW V{Decoded.x:X}, V{Decoded.y:X}, {Decoded.n}";
 }
Ejemplo n.º 5
0
 public Instruction_Ex9E(DecodedInstruction decodedInstruction) : base(decodedInstruction)
 {
     Description = $"Skip next instruction if key with the value of V{Decoded.x:X} is pressed.";
     Mnemonic    = $"SKP V{Decoded.x:X}";
 }
Ejemplo n.º 6
0
 public Instruction_8xy5(DecodedInstruction decodedInstruction) : base(decodedInstruction)
 {
     Description = $"Set V{Decoded.x:X} = V{Decoded.x:X} - V{Decoded.y:X}, VF = NOT borrow.";
     Mnemonic    = $"SUB V{Decoded.x:X}, V{Decoded.y:X}";
 }
Ejemplo n.º 7
0
 public Instruction_8xy4(DecodedInstruction decodedInstruction) : base(decodedInstruction)
 {
     Description = $"Set V{Decoded.x:X} = V{Decoded.x:X} + V{Decoded.y:X}, VF = carry.";
     Mnemonic    = $"ADD V{Decoded.x:X}, V{Decoded.y:X}";
 }
Ejemplo n.º 8
0
 public Instruction_Cxkk(DecodedInstruction decodedInstruction) : base(decodedInstruction)
 {
     Description = $"Set V{Decoded.x:X} = random byte AND 0x{Decoded.kk:X}.";
     Mnemonic    = $"RND V{Decoded.x:X}, 0x{Decoded.kk:X}";
 }
Ejemplo n.º 9
0
 protected CpuInstruction(DecodedInstruction decodedInstruction)
 {
     Decoded = decodedInstruction;
 }
Ejemplo n.º 10
0
 public Instruction_Fx29(DecodedInstruction decodedInstruction) : base(decodedInstruction)
 {
     Description = $"Set I = address of sprite for value of V{Decoded.x:X}.";
     Mnemonic    = $"LD F, V{Decoded.x:X}";
 }
Ejemplo n.º 11
0
 public UndefinedInstruction(DecodedInstruction decodedInstruction) : base(decodedInstruction)
 {
     Description = string.Empty;
     Mnemonic    = $"0x{Decoded.InstructionCode:X4}";
 }
Ejemplo n.º 12
0
 public Instruction_Fx33(DecodedInstruction decodedInstruction) : base(decodedInstruction)
 {
     Description = $"Set [I, I+1, I+2] = BCD(V{Decoded.x:X}).";
     Mnemonic    = $"LD B, V{Decoded.x:X}";
 }
Ejemplo n.º 13
0
 public Instruction_Fx0A(DecodedInstruction decodedInstruction) : base(decodedInstruction)
 {
     Description = $"Wait for a key press, store the value of the key in V{Decoded.x:X}.";
     Mnemonic    = $"LD V{Decoded.x:X}, K";
 }