public void Execute(Memory memory, Registers registers) { _ = registers ?? throw new ArgumentNullException(nameof(registers)); _ = memory ?? throw new ArgumentNullException(nameof(memory)); if (Operands.Length != Flawors.Single(s => s.Opc == Opc).Length - 1) { throw new InvalidOperationException(); } PerformExecute(memory, registers); BeginInstructionExecuted?.Invoke(this, this); }
public byte GetLength(byte opc) { return(Flawors.Single(s => s.Opc == opc).Length); }