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]"; }
public Instruction_Fx1E(DecodedInstruction decodedInstruction) : base(decodedInstruction) { Description = $"Set I = I + V{Decoded.x:X}."; Mnemonic = $"ADD I, V{Decoded.x:X}"; }
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}"; }
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}"; }
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}"; }
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}"; }
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}"; }
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}"; }
protected CpuInstruction(DecodedInstruction decodedInstruction) { Decoded = decodedInstruction; }
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}"; }
public UndefinedInstruction(DecodedInstruction decodedInstruction) : base(decodedInstruction) { Description = string.Empty; Mnemonic = $"0x{Decoded.InstructionCode:X4}"; }
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}"; }
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"; }