unit Z80InstructionInfo;

interface

uses
  Classes, SysUtils, Generics.Collections, Z80Instructions, TypInfo;

type
  TParamType = (ptNone, ptNumberByte, ptNumberByteIndir,
    ptNumberWord, ptNumberWordIndir, ptDisplacement,
    ptRegA, ptRegB, ptRegC, ptRegD, ptRegE, ptRegH, ptRegL, ptRegR, ptRegI,
    ptRegAF, ptRegBC, ptRegDE, ptRegHL, ptRegSP, ptRegIX, ptRegIY,
    ptRegAFPair, ptRegBCPair, ptRegDEPair, ptRegHLPair,
    ptRegBCIndir, ptRegDEIndir, ptRegHLIndir, ptRegSPIndir, ptRegCIndir,
    ptFlagZ, ptFlagNZ, ptFlagC, ptFlagNC, ptFlagP, ptFlagPO, ptFlagPE, ptFlagM,
    pt00, pt08, pt10, pt18, pt20, pt28, pt30, pt38,
    pt0, pt1, pt2, pt3, pt4, pt5, pt6, pt7);

  TParamTypes = array of TParamType;

  TInstructionInfo = class
    Instruction: TInstruction;
    Name: string;
    Params: TParamTypes;
    Description: string;
    Cycles: Integer;
    CycleFalseCond: Integer;
  end;

  { TInstructionSet }

  TInstructionSet = class
    Items: TObjectList<TInstructionInfo>;
    function SearchName(Name: string): TInstructionInfo;
    function SearchInstruction(Instruction: TInstruction): TInstructionInfo;
    function AddNew(Instruction: TInstruction; Name: string;
      Params: TParamTypes; Description: string = ''; Cycles: Integer = 0; CycleFalseCond: Integer = 0): TInstructionInfo;
    function Check(InstructionMethods: TInstructionMethods): string;
    constructor Create;
    destructor Destroy; override;
  end;


function StrToParamType(Text, InstructionName: string): TParamType;

const
  ParamTypeText: array[TParamType] of string = (
    '', 'n', '(n)', 'nn', '(nn)', 'disp',
    'A', 'B', 'C', 'D', 'E', 'H', 'L', 'R', 'I',
    'AF', 'BC', 'DE', 'HL', 'SP', 'IX', 'IY',
    'AF''', 'BC''', 'DE''', 'HL''',
    '(BC)', '(DE)', '(HL)', '(SP)', '(C)',
    'Z', 'NZ', 'C', 'NC', 'P', 'PO', 'PE', 'M',
    '00H', '08H', '10H', '18H', '20h', '28H', '30H', '38H',
    '0', '1', '2', '3', '4', '5', '6', '7');


implementation

{ TInstructionSet }

function TInstructionSet.SearchName(Name: string): TInstructionInfo;
var
  I: Integer;
begin
  I := 0;
  while (I < Items.Count) and (Items[I].Name <> Name) do Inc(I);
  if I < Items.Count then Result := Items[I]
    else Result := nil;
end;

function TInstructionSet.SearchInstruction(Instruction: TInstruction
  ): TInstructionInfo;
var
  I: Integer;
begin
  I := 0;
  while (I < Items.Count) and (Items[I].Instruction <> Instruction) do Inc(I);
  if I < Items.Count then Result := Items[I]
    else Result := nil;
end;

function TInstructionSet.AddNew(Instruction: TInstruction; Name: string;
  Params: TParamTypes; Description: string = ''; Cycles: Integer = 0;
  CycleFalseCond: Integer = 0): TInstructionInfo;
begin
  Result := TInstructionInfo.Create;
  Result.Instruction := Instruction;
  Result.Name := Name;
  Result.Params := Params;
  Result.Description := Description;
  Result.Cycles := Cycles;
  Result.CycleFalseCond := CycleFalseCond;
  Items.Add(Result);
end;

function TInstructionSet.Check(InstructionMethods: TInstructionMethods): string;
var
  Instruction: TInstruction;
  InstructionInfo: TInstructionInfo;
begin
  Result := '';
  for Instruction := Low(TInstruction) to High(TInstruction) do
  begin
    if Assigned(InstructionMethods[Instruction]) then begin
      InstructionInfo := SearchInstruction(Instruction);
      if not Assigned(InstructionInfo) then
        Result := Result + 'Missing instruction info ' + IntToHex(Integer(Instruction), 4) + LineEnding;
    end;
  end;
end;

function StrToParamType(Text, InstructionName: string): TParamType;
var
  ParamType: TParamType;
begin
  Result := ptNone;
  Text := Text.ToLower;
  for ParamType := Low(TParamType) to High(TParamType) do
    if Text = ParamTypeText[ParamType].ToLower then begin
      if (ParamType = ptRegD) and ((InstructionName = 'jr') or (InstructionName = 'djnz')) then
        Result := ptDisplacement
        else Result := ParamType;
      Break;
    end;
end;

constructor TInstructionSet.Create;
begin
  Items := TObjectList<TInstructionInfo>.Create;
  AddNew(in_NOP, 'NOP', [], 'No operation is performed.', 4, 0);
  AddNew(in_LD_BC_NN, 'LD', [ptRegBC, ptNumberWord], 'Loads nn into BC.', 10, 0);
  AddNew(in_LD_BC_Indirect_A, 'LD', [ptRegBCIndir, ptRegA], 'Stores A into the memory location pointed to by BC.', 7, 0);
  AddNew(in_INC_BC, 'INC', [ptRegBC], 'Adds one to BC.', 6, 0);
  AddNew(in_INC_B, 'INC', [ptRegB], 'Adds one to B.', 4, 0);
  AddNew(in_DEC_B, 'DEC', [ptRegB], 'Subtracts one from B.', 4, 0);
  AddNew(in_LD_B_N, 'LD', [ptRegB, ptNumberByte], 'Loads n into B.', 7, 0);
  AddNew(in_RLCA, 'RLCA', [], 'The contents of A are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.', 4, 0);
  AddNew(in_EX_AF_AF_Pair, 'EX', [ptRegAF, ptRegAFPair], 'Exchanges the 16-bit contents of AF and AF''.', 4, 0);
  AddNew(in_ADD_HL_BC, 'ADD', [ptRegHL, ptRegBC], 'The value of BC is added to HL.', 11, 0);
  AddNew(in_LD_A_BC_Indirect, 'LD', [ptRegA, ptRegBCIndir], 'Loads the value pointed to by BC into A.', 7, 0);
  AddNew(in_DEC_BC, 'DEC', [ptRegBC], 'Subtracts one from BC.', 6, 0);
  AddNew(in_INC_C, 'INC', [ptRegC], 'Adds one to C.', 4, 0);
  AddNew(in_DEC_C, 'DEC', [ptRegC], 'Subtracts one from C.', 4, 0);
  AddNew(in_LD_C_N, 'LD', [ptRegC, ptNumberByte], 'Loads n into C.', 7, 0);
  AddNew(in_RRCA, 'RRCA', [], 'The contents of A are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.', 4, 0);
  AddNew(in_DJNZ_D, 'DJNZ', [ptDisplacement], 'The B register is decremented, and if not zero, the signed value d is added to PC. The jump is measured from the start of the instruction opcode.', 13, 8);
  AddNew(in_LD_DE_NN, 'LD', [ptRegDE, ptNumberWord], 'Loads nn into DE.', 10, 0);
  AddNew(in_LD_DE_Indirect_A, 'LD', [ptRegDEIndir, ptRegA], 'Stores A into the memory location pointed to by DE.', 7, 0);
  AddNew(in_INC_DE, 'INC', [ptRegDE], 'Adds one to DE.', 6, 0);
  AddNew(in_INC_D, 'INC', [ptRegD], 'Adds one to D.', 4, 0);
  AddNew(in_DEC_D, 'DEC', [ptRegD], 'Subtracts one from D.', 4, 0);
  AddNew(in_LD_D_N, 'LD', [ptRegD, ptNumberByte], 'Loads n into D.', 7, 0);
  AddNew(in_RLA, 'RLA', [], 'The contents of A are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.', 4, 0);
  AddNew(in_JR_D, 'JR', [ptDisplacement], 'The signed value d is added to PC. The jump is measured from the start of the instruction opcode.', 12, 0);
  AddNew(in_ADD_HL_DE, 'ADD', [ptRegHL, ptRegDE], 'The value of DE is added to HL.', 11, 0);
  AddNew(in_LD_A_DE_Indirect, 'LD', [ptRegA, ptRegDEIndir], 'Loads the value pointed to by DE into A.', 7, 0);
  AddNew(in_DEC_DE, 'DEC', [ptRegDE], 'Subtracts one from DE.', 6, 0);
  AddNew(in_INC_E, 'INC', [ptRegE], 'Adds one to E.', 4, 0);
  AddNew(in_DEC_E, 'DEC', [ptRegE], 'Subtracts one from E.', 4, 0);
  AddNew(in_LD_E_N, 'LD', [ptRegE, ptNumberByte], 'Loads n into E.', 7, 0);
  AddNew(in_RRA, 'RRA', [], 'The contents of A are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.', 4, 0);
  AddNew(in_JR_NZ_D, 'JR', [ptFlagNZ, ptDisplacement], 'If the zero flag is unset, the signed value d is added to PC. The jump is measured from the start of the instruction opcode.', 12, 7);
  AddNew(in_LD_HL_NN, 'LD', [ptRegHL, ptNumberWord], 'Loads nn into HL.', 10, 0);
  AddNew(in_LD_NN_Indirect_HL, 'LD', [ptNumberWordIndir, ptRegHL], 'Stores HL into the memory location pointed to by nn.', 16, 0);
  AddNew(in_INC_HL, 'INC', [ptRegHL], 'Adds one to HL.', 6, 0);
  AddNew(in_INC_H, 'INC', [ptRegH], 'Adds one to H.', 4, 0);
  AddNew(in_DEC_H, 'DEC', [ptRegH], 'Subtracts one from H.', 4, 0);
  AddNew(in_LD_H_N, 'LD', [ptRegH, ptNumberByte], 'Loads n into H.', 7, 0);
  AddNew(in_DAA, 'DAA', [], 'Adjusts A for BCD addition and subtraction operations.', 4, 0);
  AddNew(in_JR_Z_D, 'JR', [ptFlagZ, ptDisplacement], 'If the zero flag is set, the signed value d is added to PC. The jump is measured from the start of the instruction opcode.', 12, 7);
  AddNew(in_ADD_HL_HL, 'ADD', [ptRegHL, ptRegHL], 'The value of HL is added to HL.', 11, 0);
  AddNew(in_LD_HL_NN_Indirect, 'LD', [ptRegHL, ptNumberWordIndir], 'Loads the value pointed to by nn into HL.', 16, 0);
  AddNew(in_DEC_HL, 'DEC', [ptRegHL], 'Subtracts one from HL.', 6, 0);
  AddNew(in_INC_L, 'INC', [ptRegL], 'Adds one to L.', 4, 0);
  AddNew(in_DEC_L, 'DEC', [ptRegL], 'Subtracts one from L.', 4, 0);
  AddNew(in_LD_L_N, 'LD', [ptRegL, ptNumberByte], 'Loads n into L.', 7, 0);
  AddNew(in_CPL, 'CPL', [], 'The contents of A are inverted (one''s complement).', 4, 0);
  AddNew(in_JR_NC_D, 'JR', [ptFlagNC, ptDisplacement], 'If the carry flag is unset, the signed value d is added to PC. The jump is measured from the start of the instruction opcode.', 12, 7);
  AddNew(in_LD_SP_NN, 'LD', [ptRegSP, ptNumberWord], 'Loads nn into SP.', 10, 0);
  AddNew(in_LD_NN_Indirect_A, 'LD', [ptNumberWordIndir, ptRegA], 'Stores A into the memory location pointed to by nn.', 13, 0);
  AddNew(in_INC_SP, 'INC', [ptRegSP], 'Adds one to SP.', 6, 0);
  AddNew(in_INC_HL_Indirect, 'INC', [ptRegHLIndir], 'Adds one to (HL).', 11, 0);
  AddNew(in_DEC_HL_Indirect, 'DEC', [ptRegHLIndir], 'Subtracts one from (HL).', 11, 0);
  AddNew(in_LD_HL_Indirect_N, 'LD', [ptRegHLIndir, ptNumberByte], 'Loads n into (HL).', 10, 0);
  AddNew(in_SCF, 'SCF', [], 'Sets the carry flag.', 4, 0);
  AddNew(in_JR_C_D, 'JR', [ptRegC, ptDisplacement], 'If the carry flag is set, the signed value d is added to PC. The jump is measured from the start of the instruction opcode.', 12, 7);
  AddNew(in_ADD_HL_SP, 'ADD', [ptRegHL, ptRegSP], 'The value of SP is added to HL.', 11, 0);
  AddNew(in_LD_A_NN_Indirect, 'LD', [ptRegA, ptNumberWordIndir], 'Loads the value pointed to by nn into A.', 13, 0);
  AddNew(in_DEC_SP, 'DEC', [ptRegSP], 'Subtracts one from SP.', 6, 0);
  AddNew(in_INC_A, 'INC', [ptRegA], 'Adds one to A.', 4, 0);
  AddNew(in_DEC_A, 'DEC', [ptRegA], 'Subtracts one from A.', 4, 0);
  AddNew(in_LD_A_N, 'LD', [ptRegA, ptNumberByte], 'Loads n into A.', 7, 0);
  AddNew(in_CCF, 'CCF', [], 'Inverts the carry flag.', 4, 0);
  AddNew(in_LD_B_B, 'LD', [ptRegB, ptRegB], 'The contents of B are loaded into B.', 4, 0);
  AddNew(in_LD_B_C, 'LD', [ptRegB, ptRegC], 'The contents of C are loaded into B.', 4, 0);
  AddNew(in_LD_B_D, 'LD', [ptRegB, ptRegD], 'The contents of D are loaded into B.', 4, 0);
  AddNew(in_LD_B_E, 'LD', [ptRegB, ptRegE], 'The contents of E are loaded into B.', 4, 0);
  AddNew(in_LD_B_H, 'LD', [ptRegB, ptRegH], 'The contents of H are loaded into B.', 4, 0);
  AddNew(in_LD_B_L, 'LD', [ptRegB, ptRegL], 'The contents of L are loaded into B.', 4, 0);
  AddNew(in_LD_B_HL_Indirect, 'LD', [ptRegB, ptRegHLIndir], 'The contents of (HL) are loaded into B.', 7, 0);
  AddNew(in_LD_B_A, 'LD', [ptRegB, ptRegA], 'The contents of A are loaded into B.', 4, 0);
  AddNew(in_LD_C_B, 'LD', [ptRegC, ptRegB], 'The contents of B are loaded into C.', 4, 0);
  AddNew(in_LD_C_C, 'LD', [ptRegC, ptRegC], 'The contents of C are loaded into C.', 4, 0);
  AddNew(in_LD_C_D, 'LD', [ptRegC, ptRegD], 'The contents of D are loaded into C.', 4, 0);
  AddNew(in_LD_C_E, 'LD', [ptRegC, ptRegE], 'The contents of E are loaded into C.', 4, 0);
  AddNew(in_LD_C_H, 'LD', [ptRegC, ptRegH], 'The contents of H are loaded into C.', 4, 0);
  AddNew(in_LD_C_L, 'LD', [ptRegC, ptRegL], 'The contents of L are loaded into C.', 4, 0);
  AddNew(in_LD_C_HL_Indirect, 'LD', [ptRegC, ptRegHLIndir], 'The contents of (HL) are loaded into C.', 7, 0);
  AddNew(in_LD_C_A, 'LD', [ptRegC, ptRegA], 'The contents of A are loaded into C.', 4, 0);
  AddNew(in_LD_D_B, 'LD', [ptRegD, ptRegB], 'The contents of B are loaded into D.', 4, 0);
  AddNew(in_LD_D_C, 'LD', [ptRegD, ptRegC], 'The contents of C are loaded into D.', 4, 0);
  AddNew(in_LD_D_D, 'LD', [ptRegD, ptRegD], 'The contents of D are loaded into D.', 4, 0);
  AddNew(in_LD_D_E, 'LD', [ptRegD, ptRegE], 'The contents of E are loaded into D.', 4, 0);
  AddNew(in_LD_D_H, 'LD', [ptRegD, ptRegH], 'The contents of H are loaded into D.', 4, 0);
  AddNew(in_LD_D_L, 'LD', [ptRegD, ptRegL], 'The contents of L are loaded into D.', 4, 0);
  AddNew(in_LD_D_HL_Indirect, 'LD', [ptRegD, ptRegHLIndir], 'The contents of (HL) are loaded into D.', 7, 0);
  AddNew(in_LD_D_A, 'LD', [ptRegD, ptRegA], 'The contents of A are loaded into D.', 4, 0);
  AddNew(in_LD_E_B, 'LD', [ptRegE, ptRegB], 'The contents of B are loaded into E.', 4, 0);
  AddNew(in_LD_E_C, 'LD', [ptRegE, ptRegC], 'The contents of C are loaded into E.', 4, 0);
  AddNew(in_LD_E_D, 'LD', [ptRegE, ptRegD], 'The contents of D are loaded into E.', 4, 0);
  AddNew(in_LD_E_E, 'LD', [ptRegE, ptRegE], 'The contents of E are loaded into E.', 4, 0);
  AddNew(in_LD_E_H, 'LD', [ptRegE, ptRegH], 'The contents of H are loaded into E.', 4, 0);
  AddNew(in_LD_E_L, 'LD', [ptRegE, ptRegL], 'The contents of L are loaded into E.', 4, 0);
  AddNew(in_LD_E_HL_Indirect, 'LD', [ptRegE, ptRegHLIndir], 'The contents of (HL) are loaded into E.', 7, 0);
  AddNew(in_LD_E_A, 'LD', [ptRegE, ptRegA], 'The contents of A are loaded into E.', 4, 0);
  AddNew(in_LD_H_B, 'LD', [ptRegH, ptRegB], 'The contents of B are loaded into H.', 4, 0);
  AddNew(in_LD_H_C, 'LD', [ptRegH, ptRegC], 'The contents of C are loaded into H.', 4, 0);
  AddNew(in_LD_H_D, 'LD', [ptRegH, ptRegD], 'The contents of D are loaded into H.', 4, 0);
  AddNew(in_LD_H_E, 'LD', [ptRegH, ptRegE], 'The contents of E are loaded into H.', 4, 0);
  AddNew(in_LD_H_H, 'LD', [ptRegH, ptRegH], 'The contents of H are loaded into H.', 4, 0);
  AddNew(in_LD_H_L, 'LD', [ptRegH, ptRegL], 'The contents of L are loaded into H.', 4, 0);
  AddNew(in_LD_H_HL_Indirect, 'LD', [ptRegH, ptRegHLIndir], 'The contents of (HL) are loaded into H.', 7, 0);
  AddNew(in_LD_H_A, 'LD', [ptRegH, ptRegA], 'The contents of A are loaded into H.', 4, 0);
  AddNew(in_LD_L_B, 'LD', [ptRegL, ptRegB], 'The contents of B are loaded into L.', 4, 0);
  AddNew(in_LD_L_C, 'LD', [ptRegL, ptRegC], 'The contents of C are loaded into L.', 4, 0);
  AddNew(in_LD_L_D, 'LD', [ptRegL, ptRegD], 'The contents of D are loaded into L.', 4, 0);
  AddNew(in_LD_L_E, 'LD', [ptRegL, ptRegE], 'The contents of E are loaded into L.', 4, 0);
  AddNew(in_LD_L_H, 'LD', [ptRegL, ptRegH], 'The contents of H are loaded into L.', 4, 0);
  AddNew(in_LD_L_L, 'LD', [ptRegL, ptRegL], 'The contents of L are loaded into L.', 4, 0);
  AddNew(in_LD_L_HL_Indirect, 'LD', [ptRegL, ptRegHLIndir], 'The contents of (HL) are loaded into L.', 7, 0);
  AddNew(in_LD_L_A, 'LD', [ptRegL, ptRegA], 'The contents of A are loaded into L.', 4, 0);
  AddNew(in_LD_HL_Indirect_B, 'LD', [ptRegHLIndir, ptRegB], 'The contents of B are loaded into (HL).', 7, 0);
  AddNew(in_LD_HL_Indirect_C, 'LD', [ptRegHLIndir, ptRegC], 'The contents of C are loaded into (HL).', 7, 0);
  AddNew(in_LD_HL_Indirect_D, 'LD', [ptRegHLIndir, ptRegD], 'The contents of D are loaded into (HL).', 7, 0);
  AddNew(in_LD_HL_Indirect_E, 'LD', [ptRegHLIndir, ptRegE], 'The contents of E are loaded into (HL).', 7, 0);
  AddNew(in_LD_HL_Indirect_H, 'LD', [ptRegHLIndir, ptRegH], 'The contents of H are loaded into (HL).', 7, 0);
  AddNew(in_LD_HL_Indirect_L, 'LD', [ptRegHLIndir, ptRegL], 'The contents of L are loaded into (HL).', 7, 0);
  AddNew(in_HALT, 'HALT', [], 'Suspends CPU operation until an interrupt or reset occurs.', 4, 0);
  AddNew(in_LD_HL_Indirect_A, 'LD', [ptRegHLIndir, ptRegA], 'The contents of A are loaded into (HL).', 7, 0);
  AddNew(in_LD_A_B, 'LD', [ptRegA, ptRegB], 'The contents of B are loaded into A.', 4, 0);
  AddNew(in_LD_A_C, 'LD', [ptRegA, ptRegC], 'The contents of C are loaded into A.', 4, 0);
  AddNew(in_LD_A_D, 'LD', [ptRegA, ptRegD], 'The contents of D are loaded into A.', 4, 0);
  AddNew(in_LD_A_E, 'LD', [ptRegA, ptRegE], 'The contents of E are loaded into A.', 4, 0);
  AddNew(in_LD_A_H, 'LD', [ptRegA, ptRegH], 'The contents of H are loaded into A.', 4, 0);
  AddNew(in_LD_A_L, 'LD', [ptRegA, ptRegL], 'The contents of L are loaded into A.', 4, 0);
  AddNew(in_LD_A_HL_Indirect, 'LD', [ptRegA, ptRegHLIndir], 'The contents of (HL) are loaded into A.', 7, 0);
  AddNew(in_LD_A_A, 'LD', [ptRegA, ptRegA], 'The contents of A are loaded into A.', 4, 0);
  AddNew(in_ADD_A_B, 'ADD', [ptRegA, ptRegB], 'Adds B to A.', 4, 0);
  AddNew(in_ADD_A_C, 'ADD', [ptRegA, ptRegC], 'Adds C to A.', 4, 0);
  AddNew(in_ADD_A_D, 'ADD', [ptRegA, ptRegD], 'Adds D to A.', 4, 0);
  AddNew(in_ADD_A_E, 'ADD', [ptRegA, ptRegE], 'Adds E to A.', 4, 0);
  AddNew(in_ADD_A_H, 'ADD', [ptRegA, ptRegH], 'Adds H to A.', 4, 0);
  AddNew(in_ADD_A_L, 'ADD', [ptRegA, ptRegL], 'Adds L to A.', 4, 0);
  AddNew(in_ADD_A_HL_Indirect, 'ADD', [ptRegA, ptRegHLIndir], 'Adds (HL) to A.', 7, 0);
  AddNew(in_ADD_A_A, 'ADD', [ptRegA, ptRegA], 'Adds A to A.', 4, 0);
  AddNew(in_ADC_A_B, 'ADC', [ptRegA, ptRegB], 'Adds B and the carry flag to A.', 4, 0);
  AddNew(in_ADC_A_C, 'ADC', [ptRegA, ptRegC], 'Adds C and the carry flag to A.', 4, 0);
  AddNew(in_ADC_A_D, 'ADC', [ptRegA, ptRegD], 'Adds D and the carry flag to A.', 4, 0);
  AddNew(in_ADC_A_E, 'ADC', [ptRegA, ptRegE], 'Adds E and the carry flag to A.', 4, 0);
  AddNew(in_ADC_A_H, 'ADC', [ptRegA, ptRegH], 'Adds H and the carry flag to A.', 4, 0);
  AddNew(in_ADC_A_L, 'ADC', [ptRegA, ptRegL], 'Adds L and the carry flag to A.', 4, 0);
  AddNew(in_ADC_A_HL_Indirect, 'ADC', [ptRegA, ptRegHLIndir], 'Adds (HL) and the carry flag to A.', 7, 0);
  AddNew(in_ADC_A_A, 'ADC', [ptRegA, ptRegA], 'Adds A and the carry flag to A.', 4, 0);
  AddNew(in_SUB_B, 'SUB', [ptRegB], 'Subtracts B from A.', 4, 0);
  AddNew(in_SUB_C, 'SUB', [ptRegC], 'Subtracts C from A.', 4, 0);
  AddNew(in_SUB_D, 'SUB', [ptRegD], 'Subtracts D from A.', 4, 0);
  AddNew(in_SUB_E, 'SUB', [ptRegE], 'Subtracts E from A.', 4, 0);
  AddNew(in_SUB_H, 'SUB', [ptRegH], 'Subtracts H from A.', 4, 0);
  AddNew(in_SUB_L, 'SUB', [ptRegL], 'Subtracts L from A.', 4, 0);
  AddNew(in_SUB_HL_Indirect, 'SUB', [ptRegHLIndir], 'Subtracts (HL) from A.', 7, 0);
  AddNew(in_SUB_A, 'SUB', [ptRegA], 'Subtracts A from A.', 4, 0);
  AddNew(in_SBC_A_B, 'SBC', [ptRegA, ptRegB], 'Subtracts B and the carry flag from A.', 4, 0);
  AddNew(in_SBC_A_C, 'SBC', [ptRegA, ptRegC], 'Subtracts C and the carry flag from A.', 4, 0);
  AddNew(in_SBC_A_D, 'SBC', [ptRegA, ptRegD], 'Subtracts D and the carry flag from A.', 4, 0);
  AddNew(in_SBC_A_E, 'SBC', [ptRegA, ptRegE], 'Subtracts E and the carry flag from A.', 4, 0);
  AddNew(in_SBC_A_H, 'SBC', [ptRegA, ptRegH], 'Subtracts H and the carry flag from A.', 4, 0);
  AddNew(in_SBC_A_L, 'SBC', [ptRegA, ptRegL], 'Subtracts L and the carry flag from A.', 4, 0);
  AddNew(in_SBC_A_HL_Indirect, 'SBC', [ptRegA, ptRegHLIndir], 'Subtracts (HL) and the carry flag from A.', 7, 0);
  AddNew(in_SBC_A_A, 'SBC', [ptRegA, ptRegA], 'Subtracts A and the carry flag from A.', 4, 0);
  AddNew(in_AND_B, 'AND', [ptRegB], 'Bitwise AND on A with B.', 4, 0);
  AddNew(in_AND_C, 'AND', [ptRegC], 'Bitwise AND on A with C.', 4, 0);
  AddNew(in_AND_D, 'AND', [ptRegD], 'Bitwise AND on A with D.', 4, 0);
  AddNew(in_AND_E, 'AND', [ptRegE], 'Bitwise AND on A with E.', 4, 0);
  AddNew(in_AND_H, 'AND', [ptRegH], 'Bitwise AND on A with H.', 4, 0);
  AddNew(in_AND_L, 'AND', [ptRegL], 'Bitwise AND on A with L.', 4, 0);
  AddNew(in_AND_HL_Indirect, 'AND', [ptRegHLIndir], 'Bitwise AND on A with (HL).', 7, 0);
  AddNew(in_AND_A, 'AND', [ptRegA], 'Bitwise AND on A with A.', 4, 0);
  AddNew(in_XOR_B, 'XOR', [ptRegB], 'Bitwise XOR on A with B.', 4, 0);
  AddNew(in_XOR_C, 'XOR', [ptRegC], 'Bitwise XOR on A with C.', 4, 0);
  AddNew(in_XOR_D, 'XOR', [ptRegD], 'Bitwise XOR on A with D.', 4, 0);
  AddNew(in_XOR_E, 'XOR', [ptRegE], 'Bitwise XOR on A with E.', 4, 0);
  AddNew(in_XOR_H, 'XOR', [ptRegH], 'Bitwise XOR on A with H.', 4, 0);
  AddNew(in_XOR_L, 'XOR', [ptRegL], 'Bitwise XOR on A with L.', 4, 0);
  AddNew(in_XOR_HL_Indirect, 'XOR', [ptRegHLIndir], 'Bitwise XOR on A with (HL).', 7, 0);
  AddNew(in_XOR_A, 'XOR', [ptRegA], 'Bitwise XOR on A with A.', 4, 0);
  AddNew(in_OR_B, 'OR', [ptRegB], 'Bitwise OR on A with B.', 4, 0);
  AddNew(in_OR_C, 'OR', [ptRegC], 'Bitwise OR on A with C.', 4, 0);
  AddNew(in_OR_D, 'OR', [ptRegD], 'Bitwise OR on A with D.', 4, 0);
  AddNew(in_OR_E, 'OR', [ptRegE], 'Bitwise OR on A with E.', 4, 0);
  AddNew(in_OR_H, 'OR', [ptRegH], 'Bitwise OR on A with H.', 4, 0);
  AddNew(in_OR_L, 'OR', [ptRegL], 'Bitwise OR on A with L.', 4, 0);
  AddNew(in_OR_HL_Indirect, 'OR', [ptRegHLIndir], 'Bitwise OR on A with (HL).', 7, 0);
  AddNew(in_OR_A, 'OR', [ptRegA], 'Bitwise OR on A with A.', 4, 0);
  AddNew(in_CP_B, 'CP', [ptRegB], 'Subtracts B from A and affects flags according to the result. A is not modified.', 4, 0);
  AddNew(in_CP_C, 'CP', [ptRegC], 'Subtracts C from A and affects flags according to the result. A is not modified.', 4, 0);
  AddNew(in_CP_D, 'CP', [ptRegD], 'Subtracts D from A and affects flags according to the result. A is not modified.', 4, 0);
  AddNew(in_CP_E, 'CP', [ptRegE], 'Subtracts E from A and affects flags according to the result. A is not modified.', 4, 0);
  AddNew(in_CP_H, 'CP', [ptRegH], 'Subtracts H from A and affects flags according to the result. A is not modified.', 4, 0);
  AddNew(in_CP_L, 'CP', [ptRegL], 'Subtracts L from A and affects flags according to the result. A is not modified.', 4, 0);
  AddNew(in_CP_HL_Indirect, 'CP', [ptRegHLIndir], 'Subtracts (HL) from A and affects flags according to the result. A is not modified.', 7, 0);
  AddNew(in_CP_A, 'CP', [ptRegA], 'Subtracts A from A and affects flags according to the result. A is not modified.', 4, 0);
  AddNew(in_RET_NZ, 'RET', [ptFlagNZ], 'If the zero flag is unset, the top stack entry is popped into PC.', 11, 5);
  AddNew(in_POP_BC, 'POP', [ptRegBC], 'The memory location pointed to by SP is stored into C and SP is incremented. The memory location pointed to by SP is stored into B and SP is incremented again.', 10, 0);
  AddNew(in_JP_NZ_NN, 'JP', [ptFlagNZ, ptNumberWord], 'If the zero flag is unset, nn is copied to PC.', 10, 0);
  AddNew(in_JP_NN, 'JP', [ptNumberWord], 'nn is copied to PC.', 10, 0);
  AddNew(in_CALL_NZ_NN, 'CALL', [ptFlagNZ, ptNumberWord], 'If the zero flag is unset, the current PC value plus three is pushed onto the stack, then is loaded with nn.', 17, 10);
  AddNew(in_PUSH_BC, 'PUSH', [ptRegBC], 'SP is decremented and B is stored into the memory location pointed to by SP. SP is decremented again and C is stored into the memory location pointed to by SP.', 11, 0);
  AddNew(in_ADD_A_N, 'ADD', [ptRegA, ptNumberByte], 'Adds n to A.', 7, 0);
  AddNew(in_RST_00H, 'RST', [pt00], 'The current PC value plus one is pushed onto the stack, then is loaded with 0.', 11, 0);
  AddNew(in_RET_Z, 'RET', [ptFlagZ], 'If the zero flag is set, the top stack entry is popped into PC.', 11, 5);
  AddNew(in_RET, 'RET', [], 'The top stack entry is popped into PC.', 10, 0);
  AddNew(in_JP_Z_NN, 'JP', [ptFlagZ, ptNumberWord], 'If the zero flag is set, nn is copied to PC.', 10, 0);
  AddNew(in_CALL_Z_NN, 'CALL', [ptFlagZ, ptNumberWord], 'If the zero flag is set, the current PC value plus three is pushed onto the stack, then is loaded with nn.', 17, 10);
  AddNew(in_CALL_NN, 'CALL', [ptNumberWord], 'The current PC value plus three is pushed onto the stack, then is loaded with nn.', 17, 0);
  AddNew(in_ADC_A_N, 'ADC', [ptRegA, ptNumberByte], 'Adds n and the carry flag to A.', 7, 0);
  AddNew(in_RST_08H, 'RST', [pt08], 'The current PC value plus one is pushed onto the stack, then is loaded with 8.', 11, 0);
  AddNew(in_RET_NC, 'RET', [ptFlagNC], 'If the carry flag is unset, the top stack entry is popped into PC.', 11, 5);
  AddNew(in_POP_DE, 'POP', [ptRegDE], 'The memory location pointed to by SP is stored into E and SP is incremented. The memory location pointed to by SP is stored into D and SP is incremented again.', 10, 0);
  AddNew(in_JP_NC_NN, 'JP', [ptFlagNC, ptNumberWord], 'If the carry flag is unset, nn is copied to PC.', 10, 0);
  AddNew(in_OUT_N_Indirect_A, 'OUT', [ptNumberByteIndir, ptRegA], 'The value of A is written to the port whose address is formed by A in the high bits and n in the low bits.', 11, 0);
  AddNew(in_CALL_NC_NN, 'CALL', [ptFlagNC, ptNumberWord], 'If the carry flag is unset, the current PC value plus three is pushed onto the stack, then is loaded with nn.', 17, 10);
  AddNew(in_PUSH_DE, 'PUSH', [ptRegDE], 'SP is decremented and D is stored into the memory location pointed to by SP. SP is decremented again and E is stored into the memory location pointed to by SP.', 11, 0);
  AddNew(in_SUB_N, 'SUB', [ptNumberByte], 'Subtracts n from A.', 7, 0);
  AddNew(in_RST_10H, 'RST', [pt10], 'The current PC value plus one is pushed onto the stack, then is loaded with 16.', 11, 0);
  AddNew(in_RET_C, 'RET', [ptRegC], 'If the carry flag is set, the top stack entry is popped into PC.', 11, 5);
  AddNew(in_EXX, 'EXX', [], 'Exchanges the 16-bit contents of BC, DE, and HL with BC'', DE'', and HL''.', 4, 0);
  AddNew(in_JP_C_NN, 'JP', [ptRegC, ptNumberWord], 'If the carry flag is set, nn is copied to PC.', 10, 0);
  AddNew(in_IN_A_N_Indirect, 'IN', [ptRegA, ptNumberByteIndir], 'A byte from the port whose address is formed by A in the high bits and n in the low bits is written to A.', 11, 0);
  AddNew(in_CALL_C_NN, 'CALL', [ptRegC, ptNumberWord], 'If the carry flag is set, the current PC value plus three is pushed onto the stack, then is loaded with nn.', 17, 10);
  AddNew(in_SBC_A_N, 'SBC', [ptRegA, ptNumberByte], 'Subtracts n and the carry flag from A.', 7, 0);
  AddNew(in_RST_18H, 'RST', [pt18], 'The current PC value plus one is pushed onto the stack, then is loaded with 24.', 11, 0);
  AddNew(in_RET_PO, 'RET', [ptFlagPO], 'If the parity/overflow flag is unset, the top stack entry is popped into PC.', 11, 5);
  AddNew(in_POP_HL, 'POP', [ptRegHL], 'The memory location pointed to by SP is stored into L and SP is incremented. The memory location pointed to by SP is stored into H and SP is incremented again.', 10, 0);
  AddNew(in_JP_PO_NN, 'JP', [ptFlagPO, ptNumberWord], 'If the parity/overflow flag is unset, nn is copied to PC.', 10, 0);
  AddNew(in_EX_SP_Indirect_HL, 'EX', [ptRegSPIndir, ptRegHL], 'Exchanges (SP) with L, and (SP+1) with H.', 19, 0);
  AddNew(in_CALL_PO_NN, 'CALL', [ptFlagPO, ptNumberWord], 'If the parity/overflow flag is unset, the current PC value plus three is pushed onto the stack, then is loaded with nn.', 17, 10);
  AddNew(in_PUSH_HL, 'PUSH', [ptRegHL], 'SP is decremented and H is stored into the memory location pointed to by SP. SP is decremented again and L is stored into the memory location pointed to by SP.', 11, 0);
  AddNew(in_AND_N, 'AND', [ptNumberByte], 'Bitwise AND on A with n.', 7, 0);
  AddNew(in_RST_20H, 'RST', [pt20], 'The current PC value plus one is pushed onto the stack, then is loaded with 32.', 11, 0);
  AddNew(in_RET_PE, 'RET', [ptFlagPE], 'If the parity/overflow flag is set, the top stack entry is popped into PC.', 11, 5);
  AddNew(in_JP_HL_Indirect, 'JP', [ptRegHLIndir], 'Loads the value of HL into PC.', 4, 0);
  AddNew(in_JP_PE_NN, 'JP', [ptFlagPE, ptNumberWord], 'If the parity/overflow flag is set, nn is copied to PC.', 10, 0);
  AddNew(in_EX_DE_HL, 'EX', [ptRegDE, ptRegHL], 'Exchanges the 16-bit contents of DE and HL.', 4, 0);
  AddNew(in_CALL_PE_NN, 'CALL', [ptFlagPE, ptNumberWord], 'If the parity/overflow flag is set, the current PC value plus three is pushed onto the stack, then is loaded with nn.', 17, 10);
  AddNew(in_XOR_N, 'XOR', [ptNumberByte], 'Bitwise XOR on A with n.', 7, 0);
  AddNew(in_RST_28H, 'RST', [pt28], 'The current PC value plus one is pushed onto the stack, then is loaded with 40.', 11, 0);
  AddNew(in_RET_P, 'RET', [ptFlagP], 'If the sign flag is unset, the top stack entry is popped into PC.', 11, 5);
  AddNew(in_POP_AF, 'POP', [ptRegAF], 'The memory location pointed to by SP is stored into F and SP is incremented. The memory location pointed to by SP is stored into A and SP is incremented again.', 10, 0);
  AddNew(in_JP_P_NN, 'JP', [ptFlagP, ptNumberWord], 'If the sign flag is unset, nn is copied to PC.', 10, 0);
  AddNew(in_DI, 'DI', [], 'Resets both interrupt flip-flops, thus preventing maskable interrupts from triggering.', 4, 0);
  AddNew(in_CALL_P_NN, 'CALL', [ptFlagP, ptNumberWord], 'If the sign flag is unset, the current PC value plus three is pushed onto the stack, then is loaded with nn.', 17, 10);
  AddNew(in_PUSH_AF, 'PUSH', [ptRegAF], 'SP is decremented and A is stored into the memory location pointed to by SP. SP is decremented again and F is stored into the memory location pointed to by SP.', 11, 0);
  AddNew(in_OR_N, 'OR', [ptNumberByte], 'Bitwise OR on A with n.', 7, 0);
  AddNew(in_RST_30H, 'RST', [pt30], 'The current PC value plus one is pushed onto the stack, then is loaded with 48.', 11, 0);
  AddNew(in_RET_M, 'RET', [ptFlagM], 'If the sign flag is set, the top stack entry is popped into PC.', 11, 5);
  AddNew(in_LD_SP_HL, 'LD', [ptRegSP, ptRegHL], 'Loads the value of HL into SP.', 6, 0);
  AddNew(in_JP_M_NN, 'JP', [ptFlagM, ptNumberWord], 'If the sign flag is set, nn is copied to PC.', 10, 0);
  AddNew(in_EI, 'EI', [], 'Sets both interrupt flip-flops, thus allowing maskable interrupts to occur. An interrupt will not occur until after the immediately following instruction.', 4, 0);
  AddNew(in_CALL_M_NN, 'CALL', [ptFlagM, ptNumberWord], 'If the sign flag is set, the current PC value plus three is pushed onto the stack, then is loaded with nn.', 17, 10);
  AddNew(in_CP_N, 'CP', [ptNumberByte], 'Subtracts n from A and affects flags according to the result. A is not modified.', 7, 0);
  AddNew(in_RST_38H, 'RST', [pt38], 'The current PC value plus one is pushed onto the stack, then is loaded with 56.', 11, 0);
  AddNew(in_IN_B_C_Indirect, 'IN', [ptRegB, ptRegCIndir], 'A byte from the port at the 16-bit address contained in the BC register pair is written to B.', 12, 0);
  AddNew(in_OUT_C_Indirect_B, 'OUT', [ptRegCIndir, ptRegB], 'The value of B is written to the port at the 16-bit address contained in the BC register pair.', 12, 0);
  AddNew(in_SBC_HL_BC, 'SBC', [ptRegHL, ptRegBC], 'Subtracts BC and the carry flag from HL.', 15, 0);
  AddNew(in_LD_NN_Indirect_BC, 'LD', [ptNumberWordIndir, ptRegBC], 'Stores BC into the memory location pointed to by nn.', 20, 0);
  AddNew(in_NEG, 'NEG', [], 'The contents of A are negated (two''s complement). Operation is the same as subtracting A from zero.', 8, 0);
  AddNew(in_RETN, 'RETN', [], 'Used at the end of a non-maskable interrupt service routine (located at 0066h) to pop the top stack entry into PC. The value of IFF2 is copied to IFF1 so that maskable interrupts are allowed to continue as before. NMIs are not enabled on the TI.', 14, 0);
  AddNew(in_IM_0, 'IM', [pt0], 'Sets interrupt mode 0.', 8, 0);
  AddNew(in_LD_I_A, 'LD', [ptRegI, ptRegA], 'Stores the value of A into register I.', 9, 0);
  AddNew(in_IN_C_C_Indirect, 'IN', [ptRegC, ptRegCIndir], 'A byte from the port at the 16-bit address contained in the BC register pair is written to C.', 12, 0);
  AddNew(in_OUT_C_Indirect_C, 'OUT', [ptRegCIndir, ptRegC], 'The value of C is written to the port at the 16-bit address contained in the BC register pair.', 12, 0);
  AddNew(in_ADC_HL_BC, 'ADC', [ptRegHL, ptRegBC], 'Adds BC and the carry flag to HL.', 15, 0);
  AddNew(in_LD_BC_NN_Indirect, 'LD', [ptRegBC, ptNumberWordIndir], 'Loads the value pointed to by nn into BC.', 20, 0);
  AddNew(in_RETI, 'RETI', [], 'Used at the end of a maskable interrupt service routine. The top stack entry is popped into PC, and signals an I/O device that the interrupt has finished, allowing nested interrupts (not a consideration on the TI).', 14, 0);
  AddNew(in_LD_R_A, 'LD', [ptRegR, ptRegA], 'Stores the value of A into register R.', 9, 0);
  AddNew(in_IN_D_C_Indirect, 'IN', [ptRegD, ptRegCIndir], 'A byte from the port at the 16-bit address contained in the BC register pair is written to D.', 12, 0);
  AddNew(in_OUT_C_Indirect_D, 'OUT', [ptRegCIndir, ptRegD], 'The value of D is written to the port at the 16-bit address contained in the BC register pair.', 12, 0);
  AddNew(in_SBC_HL_DE, 'SBC', [ptRegHL, ptRegDE], 'Subtracts DE and the carry flag from HL.', 15, 0);
  AddNew(in_LD_NN_Indirect_DE, 'LD', [ptNumberWordIndir, ptRegDE], 'Stores DE into the memory location pointed to by nn.', 20, 0);
  AddNew(in_IM_1, 'IM', [pt1], 'Sets interrupt mode 1.', 8, 0);
  AddNew(in_LD_A_I, 'LD', [ptRegA, ptRegI], 'Stores the value of register I into A.', 9, 0);
  AddNew(in_IN_E_C_Indirect, 'IN', [ptRegE, ptRegCIndir], 'A byte from the port at the 16-bit address contained in the BC register pair is written to E.', 12, 0);
  AddNew(in_OUT_C_Indirect_E, 'OUT', [ptRegCIndir, ptRegE], 'The value of E is written to the port at the 16-bit address contained in the BC register pair.', 12, 0);
  AddNew(in_ADC_HL_DE, 'ADC', [ptRegHL, ptRegDE], 'Adds DE and the carry flag to HL.', 15, 0);
  AddNew(in_LD_DE_NN_Indirect, 'LD', [ptRegDE, ptNumberWordIndir], 'Loads the value pointed to by nn into DE.', 20, 0);
  AddNew(in_IM_2, 'IM', [pt2], 'Sets interrupt mode 2.', 8, 0);
  AddNew(in_LD_A_R, 'LD', [ptRegA, ptRegR], 'Stores the value of register R into A.', 9, 0);
  AddNew(in_IN_H_C_Indirect, 'IN', [ptRegH, ptRegCIndir], 'A byte from the port at the 16-bit address contained in the BC register pair is written to H.', 12, 0);
  AddNew(in_OUT_C_Indirect_H, 'OUT', [ptRegCIndir, ptRegH], 'The value of H is written to the port at the 16-bit address contained in the BC register pair.', 12, 0);
  AddNew(in_SBC_HL_HL, 'SBC', [ptRegHL, ptRegHL], 'Subtracts HL and the carry flag from HL.', 15, 0);
  AddNew(in_RRD, 'RRD', [], 'The contents of the low-order nibble of (HL) are copied to the low-order nibble of A. The previous contents are copied to the high-order nibble of (HL). The previous contents are copied to the low-order nibble of (HL).', 18, 0);
  AddNew(in_IN_L_C_Indirect, 'IN', [ptRegL, ptRegCIndir], 'A byte from the port at the 16-bit address contained in the BC register pair is written to L.', 12, 0);
  AddNew(in_OUT_C_Indirect_L, 'OUT', [ptRegCIndir, ptRegL], 'The value of L is written to the port at the 16-bit address contained in the BC register pair.', 12, 0);
  AddNew(in_ADC_HL_HL, 'ADC', [ptRegHL, ptRegHL], 'Adds HL and the carry flag to HL.', 15, 0);
  AddNew(in_RLD, 'RLD', [], 'The contents of the low-order nibble of (HL) are copied to the high-order nibble of (HL). The previous contents are copied to the low-order nibble of A. The previous contents are copied to the low-order nibble of (HL).', 18, 0);
  AddNew(in_SBC_HL_SP, 'SBC', [ptRegHL, ptRegSP], 'Subtracts SP and the carry flag from HL.', 15, 0);
  AddNew(in_LD_NN_Indirect_SP, 'LD', [ptNumberWordIndir, ptRegSP], 'Stores SP into the memory location pointed to by nn.', 20, 0);
  AddNew(in_IN_A_C_Indirect, 'IN', [ptRegA, ptRegCIndir], 'A byte from the port at the 16-bit address contained in the BC register pair is written to A.', 12, 0);
  AddNew(in_OUT_C_Indirect_A, 'OUT', [ptRegCIndir, ptRegA], 'The value of A is written to the port at the 16-bit address contained in the BC register pair.', 12, 0);
  AddNew(in_ADC_HL_SP, 'ADC', [ptRegHL, ptRegSP], 'Adds SP and the carry flag to HL.', 15, 0);
  AddNew(in_LD_SP_NN_Indirect, 'LD', [ptRegSP, ptNumberWordIndir], 'Loads the value pointed to by nn into SP.', 20, 0);
  AddNew(in_LDI, 'LDI', [], 'Transfers a byte of data from the memory location pointed to by HL to the memory location pointed to by DE. Then HL and DE are incremented and BC is decremented. p/v is reset if BC becomes zero and set otherwise.', 16, 0);
  AddNew(in_CPI, 'CPI', [], 'Compares the value of the memory location pointed to by HL with A. Then HL is incremented and BC is decremented. p/v is reset if BC becomes zero and set otherwise.', 16, 0);
  AddNew(in_INI, 'INI', [], 'A byte from the port at the 16-bit address contained in the BC register pair is written to the memory location pointed to by HL. Then HL is incremented and B is decremented. Note that the carry flag may be affected, contrary to documentation.   <a href="http://z80.info/z80undoc3.txt">Read More</a>', 16, 0);
  AddNew(in_OUTI, 'OUTI', [], 'B is decremented. A byte from the memory location pointed to by HL is written to the port at the 16-bit address contained in the BC register pair. Then HL is incremented. Note that the carry flag may be affected, contrary to documentation.   <a href="http://z80.info/z80undoc3.txt">Read More</a>', 16, 0);
  AddNew(in_LDD, 'LDD', [], 'Transfers a byte of data from the memory location pointed to by HL to the memory location pointed to by DE. Then HL, DE, and BC are decremented. p/v is reset if BC becomes zero and set otherwise.', 16, 0);
  AddNew(in_CPD, 'CPD', [], 'Compares the value of the memory location pointed to by HL with A. Then HL and BC are decremented. p/v is reset if BC becomes zero and set otherwise.', 16, 0);
  AddNew(in_IND, 'IND', [], 'A byte from the port at the 16-bit address contained in the BC register pair is written to the memory location pointed to by HL. Then HL and B are decremented. Note that the carry flag may be affected, contrary to documentation.   <a href="http://z80.info/z80undoc3.txt">Read More</a>', 16, 0);
  AddNew(in_OUTD, 'OUTD', [], 'B is decremented. A byte from the memory location pointed to by HL is written to the port at the 16-bit address contained in the BC register pair. Then HL is decremented. Note that the carry flag may be affected, contrary to documentation.   <a href="http://z80.info/z80undoc3.txt">Read More</a>', 16, 0);
  AddNew(in_LDIR, 'LDIR', [], 'Transfers a byte of data from the memory location pointed to by HL to the memory location pointed to by DE. Then HL and DE are incremented and BC is decremented. If BC is not zero, this operation is repeated. Interrupts can trigger while this instruction is processing.', 21, 16);
  AddNew(in_CPIR, 'CPIR', [], 'Compares the value of the memory location pointed to by HL with A. Then HL is incremented and BC is decremented. If BC is not zero and z is not set, this operation is repeated. p/v is reset if BC becomes zero and set otherwise, acting as an indicator that HL reached a memory location whose value equalled A before the counter went to zero. Interrupts can trigger while this instruction is processing.', 21, 16);
  AddNew(in_INIR, 'INIR', [], 'A byte from the port at the 16-bit address contained in the BC register pair is written to the memory location pointed to by HL. Then HL is incremented and B is decremented. If B is not zero, this operation is repeated. Interrupts can trigger while this instruction is processing. Note that the carry flag may be affected, contrary to documentation.   <a href="http://z80.info/z80undoc3.txt">Read More</a>', 21, 16);
  AddNew(in_OTIR, 'OTIR', [], 'B is decremented. A byte from the memory location pointed to by HL is written to the port at the 16-bit address contained in the BC register pair. Then HL is incremented. If B is not zero, this operation is repeated. Interrupts can trigger while this instruction is processing. Note that the carry flag may be affected, contrary to documentation.   <a href="http://z80.info/z80undoc3.txt">Read More</a>', 21, 16);
  AddNew(in_LDDR, 'LDDR', [], 'Transfers a byte of data from the memory location pointed to by HL to the memory location pointed to by DE. Then HL, DE, and BC are decremented. If BC is not zero, this operation is repeated. Interrupts can trigger while this instruction is processing.', 21, 16);
  AddNew(in_CPDR, 'CPDR', [], 'Compares the value of the memory location pointed to by HL with A. Then HL and BC are decremented. If BC is not zero and z is not set, this operation is repeated. p/v is reset if BC becomes zero and set otherwise, acting as an indicator that HL reached a memory location whose value equalled A before the counter went to zero. Interrupts can trigger while this instruction is processing.', 21, 16);
  AddNew(in_INDR, 'INDR', [], 'A byte from the port at the 16-bit address contained in the BC register pair is written to the memory location pointed to by HL. Then HL and B are decremented. If B is not zero, this operation is repeated. Interrupts can trigger while this instruction is processing. Note that the carry flag may be affected, contrary to documentation.   <a href="http://z80.info/z80undoc3.txt">Read More</a>', 21, 16);
  AddNew(in_OTDR, 'OTDR', [], 'B is decremented. A byte from the memory location pointed to by HL is written to the port at the 16-bit address contained in the BC register pair. Then HL is decremented. If B is not zero, this operation is repeated. Interrupts can trigger while this instruction is processing. Note that the carry flag may be affected, contrary to documentation.   <a href="http://z80.info/z80undoc3.txt">Read More</a>', 21, 16);
  AddNew(in_RLC_B, 'RLC', [ptRegB], 'The contents of B are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.', 8, 0);
  AddNew(in_RLC_C, 'RLC', [ptRegC], 'The contents of C are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.', 8, 0);
  AddNew(in_RLC_D, 'RLC', [ptRegD], 'The contents of D are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.', 8, 0);
  AddNew(in_RLC_E, 'RLC', [ptRegE], 'The contents of E are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.', 8, 0);
  AddNew(in_RLC_H, 'RLC', [ptRegH], 'The contents of H are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.', 8, 0);
  AddNew(in_RLC_L, 'RLC', [ptRegL], 'The contents of L are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.', 8, 0);
  AddNew(in_RLC_HL_Indirect, 'RLC', [ptRegHLIndir], 'The contents of (HL) are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.', 15, 0);
  AddNew(in_RLC_A, 'RLC', [ptRegA], 'The contents of A are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.', 8, 0);
  AddNew(in_RRC_B, 'RRC', [ptRegB], 'The contents of B are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.', 8, 0);
  AddNew(in_RRC_C, 'RRC', [ptRegC], 'The contents of C are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.', 8, 0);
  AddNew(in_RRC_D, 'RRC', [ptRegD], 'The contents of D are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.', 8, 0);
  AddNew(in_RRC_E, 'RRC', [ptRegE], 'The contents of E are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.', 8, 0);
  AddNew(in_RRC_H, 'RRC', [ptRegH], 'The contents of H are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.', 8, 0);
  AddNew(in_RRC_L, 'RRC', [ptRegL], 'The contents of L are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.', 8, 0);
  AddNew(in_RRC_HL_Indirect, 'RRC', [ptRegHLIndir], 'The contents of (HL) are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.', 15, 0);
  AddNew(in_RRC_A, 'RRC', [ptRegA], 'The contents of A are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.', 8, 0);
  AddNew(in_RL_B, 'RL', [ptRegB], 'The contents of B are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.', 8, 0);
  AddNew(in_RL_C, 'RL', [ptRegC], 'The contents of C are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.', 8, 0);
  AddNew(in_RL_D, 'RL', [ptRegD], 'The contents of D are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.', 8, 0);
  AddNew(in_RL_E, 'RL', [ptRegE], 'The contents of E are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.', 8, 0);
  AddNew(in_RL_H, 'RL', [ptRegH], 'The contents of H are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.', 8, 0);
  AddNew(in_RL_L, 'RL', [ptRegL], 'The contents of L are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.', 8, 0);
  AddNew(in_RL_HL_Indirect, 'RL', [ptRegHLIndir], 'The contents of (HL) are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.', 15, 0);
  AddNew(in_RL_A, 'RL', [ptRegA], 'The contents of A are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.', 8, 0);
  AddNew(in_RR_B, 'RR', [ptRegB], 'The contents of B are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.', 8, 0);
  AddNew(in_RR_C, 'RR', [ptRegC], 'The contents of C are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.', 8, 0);
  AddNew(in_RR_D, 'RR', [ptRegD], 'The contents of D are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.', 8, 0);
  AddNew(in_RR_E, 'RR', [ptRegE], 'The contents of E are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.', 8, 0);
  AddNew(in_RR_H, 'RR', [ptRegH], 'The contents of H are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.', 8, 0);
  AddNew(in_RR_L, 'RR', [ptRegL], 'The contents of L are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.', 8, 0);
  AddNew(in_RR_HL_Indirect, 'RR', [ptRegHLIndir], 'The contents of (HL) are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.', 15, 0);
  AddNew(in_RR_A, 'RR', [ptRegA], 'The contents of A are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.', 8, 0);
  AddNew(in_SLA_B, 'SLA', [ptRegB], 'The contents of B are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.', 8, 0);
  AddNew(in_SLA_C, 'SLA', [ptRegC], 'The contents of C are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.', 8, 0);
  AddNew(in_SLA_D, 'SLA', [ptRegD], 'The contents of D are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.', 8, 0);
  AddNew(in_SLA_E, 'SLA', [ptRegE], 'The contents of E are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.', 8, 0);
  AddNew(in_SLA_H, 'SLA', [ptRegH], 'The contents of H are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.', 8, 0);
  AddNew(in_SLA_L, 'SLA', [ptRegL], 'The contents of L are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.', 8, 0);
  AddNew(in_SLA_HL_Indirect, 'SLA', [ptRegHLIndir], 'The contents of (HL) are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.', 15, 0);
  AddNew(in_SLA_A, 'SLA', [ptRegA], 'The contents of A are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.', 8, 0);
  AddNew(in_SRA_B, 'SRA', [ptRegB], 'The contents of B are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.', 8, 0);
  AddNew(in_SRA_C, 'SRA', [ptRegC], 'The contents of C are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.', 8, 0);
  AddNew(in_SRA_D, 'SRA', [ptRegD], 'The contents of D are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.', 8, 0);
  AddNew(in_SRA_E, 'SRA', [ptRegE], 'The contents of E are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.', 8, 0);
  AddNew(in_SRA_H, 'SRA', [ptRegH], 'The contents of H are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.', 8, 0);
  AddNew(in_SRA_L, 'SRA', [ptRegL], 'The contents of L are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.', 8, 0);
  AddNew(in_SRA_HL_Indirect, 'SRA', [ptRegHLIndir], 'The contents of (HL) are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.', 15, 0);
  AddNew(in_SRA_A, 'SRA', [ptRegA], 'The contents of A are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.', 8, 0);
  AddNew(in_SRL_B, 'SRL', [ptRegB], 'The contents of B are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.', 8, 0);
  AddNew(in_SRL_C, 'SRL', [ptRegC], 'The contents of C are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.', 8, 0);
  AddNew(in_SRL_D, 'SRL', [ptRegD], 'The contents of D are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.', 8, 0);
  AddNew(in_SRL_E, 'SRL', [ptRegE], 'The contents of E are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.', 8, 0);
  AddNew(in_SRL_H, 'SRL', [ptRegH], 'The contents of H are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.', 8, 0);
  AddNew(in_SRL_L, 'SRL', [ptRegL], 'The contents of L are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.', 8, 0);
  AddNew(in_SRL_HL_Indirect, 'SRL', [ptRegHLIndir], 'The contents of (HL) are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.', 15, 0);
  AddNew(in_SRL_A, 'SRL', [ptRegA], 'The contents of A are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.', 8, 0);
  AddNew(in_BIT_0_B, 'BIT', [pt0, ptRegB], 'Tests bit 0 of B.', 8, 0);
  AddNew(in_BIT_0_C, 'BIT', [pt0, ptRegC], 'Tests bit 0 of C.', 8, 0);
  AddNew(in_BIT_0_D, 'BIT', [pt0, ptRegD], 'Tests bit 0 of D.', 8, 0);
  AddNew(in_BIT_0_E, 'BIT', [pt0, ptRegE], 'Tests bit 0 of E.', 8, 0);
  AddNew(in_BIT_0_H, 'BIT', [pt0, ptRegH], 'Tests bit 0 of H.', 8, 0);
  AddNew(in_BIT_0_L, 'BIT', [pt0, ptRegL], 'Tests bit 0 of L.', 8, 0);
  AddNew(in_BIT_0_HL_Indirect, 'BIT', [pt0, ptRegHLIndir], 'Tests bit 0 of (HL).', 12, 0);
  AddNew(in_BIT_0_A, 'BIT', [pt0, ptRegA], 'Tests bit 0 of A.', 8, 0);
  AddNew(in_BIT_1_B, 'BIT', [pt1, ptRegB], 'Tests bit 1 of B.', 8, 0);
  AddNew(in_BIT_1_C, 'BIT', [pt1, ptRegC], 'Tests bit 1 of C.', 8, 0);
  AddNew(in_BIT_1_D, 'BIT', [pt1, ptRegD], 'Tests bit 1 of D.', 8, 0);
  AddNew(in_BIT_1_E, 'BIT', [pt1, ptRegE], 'Tests bit 1 of E.', 8, 0);
  AddNew(in_BIT_1_H, 'BIT', [pt1, ptRegH], 'Tests bit 1 of H.', 8, 0);
  AddNew(in_BIT_1_L, 'BIT', [pt1, ptRegL], 'Tests bit 1 of L.', 8, 0);
  AddNew(in_BIT_1_HL_Indirect, 'BIT', [pt1, ptRegHLIndir], 'Tests bit 1 of (HL).', 12, 0);
  AddNew(in_BIT_1_A, 'BIT', [pt1, ptRegA], 'Tests bit 1 of A.', 8, 0);
  AddNew(in_BIT_2_B, 'BIT', [pt2, ptRegB], 'Tests bit 2 of B.', 8, 0);
  AddNew(in_BIT_2_C, 'BIT', [pt2, ptRegC], 'Tests bit 2 of C.', 8, 0);
  AddNew(in_BIT_2_D, 'BIT', [pt2, ptRegD], 'Tests bit 2 of D.', 8, 0);
  AddNew(in_BIT_2_E, 'BIT', [pt2, ptRegE], 'Tests bit 2 of E.', 8, 0);
  AddNew(in_BIT_2_H, 'BIT', [pt2, ptRegH], 'Tests bit 2 of H.', 8, 0);
  AddNew(in_BIT_2_L, 'BIT', [pt2, ptRegL], 'Tests bit 2 of L.', 8, 0);
  AddNew(in_BIT_2_HL_Indirect, 'BIT', [pt2, ptRegHLIndir], 'Tests bit 2 of (HL).', 12, 0);
  AddNew(in_BIT_2_A, 'BIT', [pt2, ptRegA], 'Tests bit 2 of A.', 8, 0);
  AddNew(in_BIT_3_B, 'BIT', [pt3, ptRegB], 'Tests bit 3 of B.', 8, 0);
  AddNew(in_BIT_3_C, 'BIT', [pt3, ptRegC], 'Tests bit 3 of C.', 8, 0);
  AddNew(in_BIT_3_D, 'BIT', [pt3, ptRegD], 'Tests bit 3 of D.', 8, 0);
  AddNew(in_BIT_3_E, 'BIT', [pt3, ptRegE], 'Tests bit 3 of E.', 8, 0);
  AddNew(in_BIT_3_H, 'BIT', [pt3, ptRegH], 'Tests bit 3 of H.', 8, 0);
  AddNew(in_BIT_3_L, 'BIT', [pt3, ptRegL], 'Tests bit 3 of L.', 8, 0);
  AddNew(in_BIT_3_HL_Indirect, 'BIT', [pt3, ptRegHLIndir], 'Tests bit 3 of (HL).', 12, 0);
  AddNew(in_BIT_3_A, 'BIT', [pt3, ptRegA], 'Tests bit 3 of A.', 8, 0);
  AddNew(in_BIT_4_B, 'BIT', [pt4, ptRegB], 'Tests bit 4 of B.', 8, 0);
  AddNew(in_BIT_4_C, 'BIT', [pt4, ptRegC], 'Tests bit 4 of C.', 8, 0);
  AddNew(in_BIT_4_D, 'BIT', [pt4, ptRegD], 'Tests bit 4 of D.', 8, 0);
  AddNew(in_BIT_4_E, 'BIT', [pt4, ptRegE], 'Tests bit 4 of E.', 8, 0);
  AddNew(in_BIT_4_H, 'BIT', [pt4, ptRegH], 'Tests bit 4 of H.', 8, 0);
  AddNew(in_BIT_4_L, 'BIT', [pt4, ptRegL], 'Tests bit 4 of L.', 8, 0);
  AddNew(in_BIT_4_HL_Indirect, 'BIT', [pt4, ptRegHLIndir], 'Tests bit 4 of (HL).', 12, 0);
  AddNew(in_BIT_4_A, 'BIT', [pt4, ptRegA], 'Tests bit 4 of A.', 8, 0);
  AddNew(in_BIT_5_B, 'BIT', [pt5, ptRegB], 'Tests bit 5 of B.', 8, 0);
  AddNew(in_BIT_5_C, 'BIT', [pt5, ptRegC], 'Tests bit 5 of C.', 8, 0);
  AddNew(in_BIT_5_D, 'BIT', [pt5, ptRegD], 'Tests bit 5 of D.', 8, 0);
  AddNew(in_BIT_5_E, 'BIT', [pt5, ptRegE], 'Tests bit 5 of E.', 8, 0);
  AddNew(in_BIT_5_H, 'BIT', [pt5, ptRegH], 'Tests bit 5 of H.', 8, 0);
  AddNew(in_BIT_5_L, 'BIT', [pt5, ptRegL], 'Tests bit 5 of L.', 8, 0);
  AddNew(in_BIT_5_HL_Indirect, 'BIT', [pt5, ptRegHLIndir], 'Tests bit 5 of (HL).', 12, 0);
  AddNew(in_BIT_5_A, 'BIT', [pt5, ptRegA], 'Tests bit 5 of A.', 8, 0);
  AddNew(in_BIT_6_B, 'BIT', [pt6, ptRegB], 'Tests bit 6 of B.', 8, 0);
  AddNew(in_BIT_6_C, 'BIT', [pt6, ptRegC], 'Tests bit 6 of C.', 8, 0);
  AddNew(in_BIT_6_D, 'BIT', [pt6, ptRegD], 'Tests bit 6 of D.', 8, 0);
  AddNew(in_BIT_6_E, 'BIT', [pt6, ptRegE], 'Tests bit 6 of E.', 8, 0);
  AddNew(in_BIT_6_H, 'BIT', [pt6, ptRegH], 'Tests bit 6 of H.', 8, 0);
  AddNew(in_BIT_6_L, 'BIT', [pt6, ptRegL], 'Tests bit 6 of L.', 8, 0);
  AddNew(in_BIT_6_HL_Indirect, 'BIT', [pt6, ptRegHLIndir], 'Tests bit 6 of (HL).', 12, 0);
  AddNew(in_BIT_6_A, 'BIT', [pt6, ptRegA], 'Tests bit 6 of A.', 8, 0);
  AddNew(in_BIT_7_B, 'BIT', [pt7, ptRegB], 'Tests bit 7 of B.', 8, 0);
  AddNew(in_BIT_7_C, 'BIT', [pt7, ptRegC], 'Tests bit 7 of C.', 8, 0);
  AddNew(in_BIT_7_D, 'BIT', [pt7, ptRegD], 'Tests bit 7 of D.', 8, 0);
  AddNew(in_BIT_7_E, 'BIT', [pt7, ptRegE], 'Tests bit 7 of E.', 8, 0);
  AddNew(in_BIT_7_H, 'BIT', [pt7, ptRegH], 'Tests bit 7 of H.', 8, 0);
  AddNew(in_BIT_7_L, 'BIT', [pt7, ptRegL], 'Tests bit 7 of L.', 8, 0);
  AddNew(in_BIT_7_HL_Indirect, 'BIT', [pt7, ptRegHLIndir], 'Tests bit 7 of (HL).', 12, 0);
  AddNew(in_BIT_7_A, 'BIT', [pt7, ptRegA], 'Tests bit 7 of A.', 8, 0);
  AddNew(in_RES_0_B, 'RES', [pt0, ptRegB], 'Resets bit 0 of B.', 8, 0);
  AddNew(in_RES_0_C, 'RES', [pt0, ptRegC], 'Resets bit 0 of C.', 8, 0);
  AddNew(in_RES_0_D, 'RES', [pt0, ptRegD], 'Resets bit 0 of D.', 8, 0);
  AddNew(in_RES_0_E, 'RES', [pt0, ptRegE], 'Resets bit 0 of E.', 8, 0);
  AddNew(in_RES_0_H, 'RES', [pt0, ptRegH], 'Resets bit 0 of H.', 8, 0);
  AddNew(in_RES_0_L, 'RES', [pt0, ptRegL], 'Resets bit 0 of L.', 8, 0);
  AddNew(in_RES_0_HL_Indirect, 'RES', [pt0, ptRegHLIndir], 'Resets bit 0 of (HL).', 15, 0);
  AddNew(in_RES_0_A, 'RES', [pt0, ptRegA], 'Resets bit 0 of A.', 8, 0);
  AddNew(in_RES_1_B, 'RES', [pt1, ptRegB], 'Resets bit 1 of B.', 8, 0);
  AddNew(in_RES_1_C, 'RES', [pt1, ptRegC], 'Resets bit 1 of C.', 8, 0);
  AddNew(in_RES_1_D, 'RES', [pt1, ptRegD], 'Resets bit 1 of D.', 8, 0);
  AddNew(in_RES_1_E, 'RES', [pt1, ptRegE], 'Resets bit 1 of E.', 8, 0);
  AddNew(in_RES_1_H, 'RES', [pt1, ptRegH], 'Resets bit 1 of H.', 8, 0);
  AddNew(in_RES_1_L, 'RES', [pt1, ptRegL], 'Resets bit 1 of L.', 8, 0);
  AddNew(in_RES_1_HL_Indirect, 'RES', [pt1, ptRegHLIndir], 'Resets bit 1 of (HL).', 15, 0);
  AddNew(in_RES_1_A, 'RES', [pt1, ptRegA], 'Resets bit 1 of A.', 8, 0);
  AddNew(in_RES_2_B, 'RES', [pt2, ptRegB], 'Resets bit 2 of B.', 8, 0);
  AddNew(in_RES_2_C, 'RES', [pt2, ptRegC], 'Resets bit 2 of C.', 8, 0);
  AddNew(in_RES_2_D, 'RES', [pt2, ptRegD], 'Resets bit 2 of D.', 8, 0);
  AddNew(in_RES_2_E, 'RES', [pt2, ptRegE], 'Resets bit 2 of E.', 8, 0);
  AddNew(in_RES_2_H, 'RES', [pt2, ptRegH], 'Resets bit 2 of H.', 8, 0);
  AddNew(in_RES_2_L, 'RES', [pt2, ptRegL], 'Resets bit 2 of L.', 8, 0);
  AddNew(in_RES_2_HL_Indirect, 'RES', [pt2, ptRegHLIndir], 'Resets bit 2 of (HL).', 15, 0);
  AddNew(in_RES_2_A, 'RES', [pt2, ptRegA], 'Resets bit 2 of A.', 8, 0);
  AddNew(in_RES_3_B, 'RES', [pt3, ptRegB], 'Resets bit 3 of B.', 8, 0);
  AddNew(in_RES_3_C, 'RES', [pt3, ptRegC], 'Resets bit 3 of C.', 8, 0);
  AddNew(in_RES_3_D, 'RES', [pt3, ptRegD], 'Resets bit 3 of D.', 8, 0);
  AddNew(in_RES_3_E, 'RES', [pt3, ptRegE], 'Resets bit 3 of E.', 8, 0);
  AddNew(in_RES_3_H, 'RES', [pt3, ptRegH], 'Resets bit 3 of H.', 8, 0);
  AddNew(in_RES_3_L, 'RES', [pt3, ptRegL], 'Resets bit 3 of L.', 8, 0);
  AddNew(in_RES_3_HL_Indirect, 'RES', [pt3, ptRegHLIndir], 'Resets bit 3 of (HL).', 15, 0);
  AddNew(in_RES_3_A, 'RES', [pt3, ptRegA], 'Resets bit 3 of A.', 8, 0);
  AddNew(in_RES_4_B, 'RES', [pt4, ptRegB], 'Resets bit 4 of B.', 8, 0);
  AddNew(in_RES_4_C, 'RES', [pt4, ptRegC], 'Resets bit 4 of C.', 8, 0);
  AddNew(in_RES_4_D, 'RES', [pt4, ptRegD], 'Resets bit 4 of D.', 8, 0);
  AddNew(in_RES_4_E, 'RES', [pt4, ptRegE], 'Resets bit 4 of E.', 8, 0);
  AddNew(in_RES_4_H, 'RES', [pt4, ptRegH], 'Resets bit 4 of H.', 8, 0);
  AddNew(in_RES_4_L, 'RES', [pt4, ptRegL], 'Resets bit 4 of L.', 8, 0);
  AddNew(in_RES_4_HL_Indirect, 'RES', [pt4, ptRegHLIndir], 'Resets bit 4 of (HL).', 15, 0);
  AddNew(in_RES_4_A, 'RES', [pt4, ptRegA], 'Resets bit 4 of A.', 8, 0);
  AddNew(in_RES_5_B, 'RES', [pt5, ptRegB], 'Resets bit 5 of B.', 8, 0);
  AddNew(in_RES_5_C, 'RES', [pt5, ptRegC], 'Resets bit 5 of C.', 8, 0);
  AddNew(in_RES_5_D, 'RES', [pt5, ptRegD], 'Resets bit 5 of D.', 8, 0);
  AddNew(in_RES_5_E, 'RES', [pt5, ptRegE], 'Resets bit 5 of E.', 8, 0);
  AddNew(in_RES_5_H, 'RES', [pt5, ptRegH], 'Resets bit 5 of H.', 8, 0);
  AddNew(in_RES_5_L, 'RES', [pt5, ptRegL], 'Resets bit 5 of L.', 8, 0);
  AddNew(in_RES_5_HL_Indirect, 'RES', [pt5, ptRegHLIndir], 'Resets bit 5 of (HL).', 15, 0);
  AddNew(in_RES_5_A, 'RES', [pt5, ptRegA], 'Resets bit 5 of A.', 8, 0);
  AddNew(in_RES_6_B, 'RES', [pt6, ptRegB], 'Resets bit 6 of B.', 8, 0);
  AddNew(in_RES_6_C, 'RES', [pt6, ptRegC], 'Resets bit 6 of C.', 8, 0);
  AddNew(in_RES_6_D, 'RES', [pt6, ptRegD], 'Resets bit 6 of D.', 8, 0);
  AddNew(in_RES_6_E, 'RES', [pt6, ptRegE], 'Resets bit 6 of E.', 8, 0);
  AddNew(in_RES_6_H, 'RES', [pt6, ptRegH], 'Resets bit 6 of H.', 8, 0);
  AddNew(in_RES_6_L, 'RES', [pt6, ptRegL], 'Resets bit 6 of L.', 8, 0);
  AddNew(in_RES_6_HL_Indirect, 'RES', [pt6, ptRegHLIndir], 'Resets bit 6 of (HL).', 15, 0);
  AddNew(in_RES_6_A, 'RES', [pt6, ptRegA], 'Resets bit 6 of A.', 8, 0);
  AddNew(in_RES_7_B, 'RES', [pt7, ptRegB], 'Resets bit 7 of B.', 8, 0);
  AddNew(in_RES_7_C, 'RES', [pt7, ptRegC], 'Resets bit 7 of C.', 8, 0);
  AddNew(in_RES_7_D, 'RES', [pt7, ptRegD], 'Resets bit 7 of D.', 8, 0);
  AddNew(in_RES_7_E, 'RES', [pt7, ptRegE], 'Resets bit 7 of E.', 8, 0);
  AddNew(in_RES_7_H, 'RES', [pt7, ptRegH], 'Resets bit 7 of H.', 8, 0);
  AddNew(in_RES_7_L, 'RES', [pt7, ptRegL], 'Resets bit 7 of L.', 8, 0);
  AddNew(in_RES_7_HL_Indirect, 'RES', [pt7, ptRegHLIndir], 'Resets bit 7 of (HL).', 15, 0);
  AddNew(in_RES_7_A, 'RES', [pt7, ptRegA], 'Resets bit 7 of A.', 8, 0);
  AddNew(in_SET_0_B, 'SET', [pt0, ptRegB], 'Sets bit 0 of B.', 8, 0);
  AddNew(in_SET_0_C, 'SET', [pt0, ptRegC], 'Sets bit 0 of C.', 8, 0);
  AddNew(in_SET_0_D, 'SET', [pt0, ptRegD], 'Sets bit 0 of D.', 8, 0);
  AddNew(in_SET_0_E, 'SET', [pt0, ptRegE], 'Sets bit 0 of E.', 8, 0);
  AddNew(in_SET_0_H, 'SET', [pt0, ptRegH], 'Sets bit 0 of H.', 8, 0);
  AddNew(in_SET_0_L, 'SET', [pt0, ptRegL], 'Sets bit 0 of L.', 8, 0);
  AddNew(in_SET_0_HL_Indirect, 'SET', [pt0, ptRegHLIndir], 'Sets bit 0 of (HL).', 15, 0);
  AddNew(in_SET_0_A, 'SET', [pt0, ptRegA], 'Sets bit 0 of A.', 8, 0);
  AddNew(in_SET_1_B, 'SET', [pt1, ptRegB], 'Sets bit 1 of B.', 8, 0);
  AddNew(in_SET_1_C, 'SET', [pt1, ptRegC], 'Sets bit 1 of C.', 8, 0);
  AddNew(in_SET_1_D, 'SET', [pt1, ptRegD], 'Sets bit 1 of D.', 8, 0);
  AddNew(in_SET_1_E, 'SET', [pt1, ptRegE], 'Sets bit 1 of E.', 8, 0);
  AddNew(in_SET_1_H, 'SET', [pt1, ptRegH], 'Sets bit 1 of H.', 8, 0);
  AddNew(in_SET_1_L, 'SET', [pt1, ptRegL], 'Sets bit 1 of L.', 8, 0);
  AddNew(in_SET_1_HL_Indirect, 'SET', [pt1, ptRegHLIndir], 'Sets bit 1 of (HL).', 15, 0);
  AddNew(in_SET_1_A, 'SET', [pt1, ptRegA], 'Sets bit 1 of A.', 8, 0);
  AddNew(in_SET_2_B, 'SET', [pt2, ptRegB], 'Sets bit 2 of B.', 8, 0);
  AddNew(in_SET_2_C, 'SET', [pt2, ptRegC], 'Sets bit 2 of C.', 8, 0);
  AddNew(in_SET_2_D, 'SET', [pt2, ptRegD], 'Sets bit 2 of D.', 8, 0);
  AddNew(in_SET_2_E, 'SET', [pt2, ptRegE], 'Sets bit 2 of E.', 8, 0);
  AddNew(in_SET_2_H, 'SET', [pt2, ptRegH], 'Sets bit 2 of H.', 8, 0);
  AddNew(in_SET_2_L, 'SET', [pt2, ptRegL], 'Sets bit 2 of L.', 8, 0);
  AddNew(in_SET_2_HL_Indirect, 'SET', [pt2, ptRegHLIndir], 'Sets bit 2 of (HL).', 15, 0);
  AddNew(in_SET_2_A, 'SET', [pt2, ptRegA], 'Sets bit 2 of A.', 8, 0);
  AddNew(in_SET_3_B, 'SET', [pt3, ptRegB], 'Sets bit 3 of B.', 8, 0);
  AddNew(in_SET_3_C, 'SET', [pt3, ptRegC], 'Sets bit 3 of C.', 8, 0);
  AddNew(in_SET_3_D, 'SET', [pt3, ptRegD], 'Sets bit 3 of D.', 8, 0);
  AddNew(in_SET_3_E, 'SET', [pt3, ptRegE], 'Sets bit 3 of E.', 8, 0);
  AddNew(in_SET_3_H, 'SET', [pt3, ptRegH], 'Sets bit 3 of H.', 8, 0);
  AddNew(in_SET_3_L, 'SET', [pt3, ptRegL], 'Sets bit 3 of L.', 8, 0);
  AddNew(in_SET_3_HL_Indirect, 'SET', [pt3, ptRegHLIndir], 'Sets bit 3 of (HL).', 15, 0);
  AddNew(in_SET_3_A, 'SET', [pt3, ptRegA], 'Sets bit 3 of A.', 8, 0);
  AddNew(in_SET_4_B, 'SET', [pt4, ptRegB], 'Sets bit 4 of B.', 8, 0);
  AddNew(in_SET_4_C, 'SET', [pt4, ptRegC], 'Sets bit 4 of C.', 8, 0);
  AddNew(in_SET_4_D, 'SET', [pt4, ptRegD], 'Sets bit 4 of D.', 8, 0);
  AddNew(in_SET_4_E, 'SET', [pt4, ptRegE], 'Sets bit 4 of E.', 8, 0);
  AddNew(in_SET_4_H, 'SET', [pt4, ptRegH], 'Sets bit 4 of H.', 8, 0);
  AddNew(in_SET_4_L, 'SET', [pt4, ptRegL], 'Sets bit 4 of L.', 8, 0);
  AddNew(in_SET_4_HL_Indirect, 'SET', [pt4, ptRegHLIndir], 'Sets bit 4 of (HL).', 15, 0);
  AddNew(in_SET_4_A, 'SET', [pt4, ptRegA], 'Sets bit 4 of A.', 8, 0);
  AddNew(in_SET_5_B, 'SET', [pt5, ptRegB], 'Sets bit 5 of B.', 8, 0);
  AddNew(in_SET_5_C, 'SET', [pt5, ptRegC], 'Sets bit 5 of C.', 8, 0);
  AddNew(in_SET_5_D, 'SET', [pt5, ptRegD], 'Sets bit 5 of D.', 8, 0);
  AddNew(in_SET_5_E, 'SET', [pt5, ptRegE], 'Sets bit 5 of E.', 8, 0);
  AddNew(in_SET_5_H, 'SET', [pt5, ptRegH], 'Sets bit 5 of H.', 8, 0);
  AddNew(in_SET_5_L, 'SET', [pt5, ptRegL], 'Sets bit 5 of L.', 8, 0);
  AddNew(in_SET_5_HL_Indirect, 'SET', [pt5, ptRegHLIndir], 'Sets bit 5 of (HL).', 15, 0);
  AddNew(in_SET_5_A, 'SET', [pt5, ptRegA], 'Sets bit 5 of A.', 8, 0);
  AddNew(in_SET_6_B, 'SET', [pt6, ptRegB], 'Sets bit 6 of B.', 8, 0);
  AddNew(in_SET_6_C, 'SET', [pt6, ptRegC], 'Sets bit 6 of C.', 8, 0);
  AddNew(in_SET_6_D, 'SET', [pt6, ptRegD], 'Sets bit 6 of D.', 8, 0);
  AddNew(in_SET_6_E, 'SET', [pt6, ptRegE], 'Sets bit 6 of E.', 8, 0);
  AddNew(in_SET_6_H, 'SET', [pt6, ptRegH], 'Sets bit 6 of H.', 8, 0);
  AddNew(in_SET_6_L, 'SET', [pt6, ptRegL], 'Sets bit 6 of L.', 8, 0);
  AddNew(in_SET_6_HL_Indirect, 'SET', [pt6, ptRegHLIndir], 'Sets bit 6 of (HL).', 15, 0);
  AddNew(in_SET_6_A, 'SET', [pt6, ptRegA], 'Sets bit 6 of A.', 8, 0);
  AddNew(in_SET_7_B, 'SET', [pt7, ptRegB], 'Sets bit 7 of B.', 8, 0);
  AddNew(in_SET_7_C, 'SET', [pt7, ptRegC], 'Sets bit 7 of C.', 8, 0);
  AddNew(in_SET_7_D, 'SET', [pt7, ptRegD], 'Sets bit 7 of D.', 8, 0);
  AddNew(in_SET_7_E, 'SET', [pt7, ptRegE], 'Sets bit 7 of E.', 8, 0);
  AddNew(in_SET_7_H, 'SET', [pt7, ptRegH], 'Sets bit 7 of H.', 8, 0);
  AddNew(in_SET_7_L, 'SET', [pt7, ptRegL], 'Sets bit 7 of L.', 8, 0);
  AddNew(in_SET_7_HL_Indirect, 'SET', [pt7, ptRegHLIndir], 'Sets bit 7 of (HL).', 15, 0);
  AddNew(in_SET_7_A, 'SET', [pt7, ptRegA], 'Sets bit 7 of A.', 8, 0);
  AddNew(in_ADD_IX_BC, 'ADD', [ptRegIX, ptRegBC], 'The value of BC is added to IX.', 15, 0);
  AddNew(in_ADD_IX_DE, 'ADD', [ptRegIX, ptRegDE], 'The value of DE is added to IX.', 15, 0);
  AddNew(in_LD_IX_NN, 'LD', [ptRegIX, ptNumberWord], 'Loads nn into register IX.', 14, 0);
  AddNew(in_LD_NN_Indirect_IX, 'LD', [ptNumberWordIndir, ptRegIX], 'Stores IX into the memory location pointed to by nn.', 20, 0);
  AddNew(in_INC_IX, 'INC', [ptRegIX], 'Adds one to IX.', 10, 0);
  AddNew(in_ADD_IX_IX, 'ADD', [ptRegIX, ptRegIX], 'The value of IX is added to IX.', 15, 0);
  AddNew(in_LD_IX_NN_Indirect, 'LD', [ptRegIX, ptNumberWordIndir], 'Loads the value pointed to by nn into IX.', 20, 0);
  AddNew(in_DEC_IX, 'DEC', [ptRegIX], 'Subtracts one from IX.', 10, 0);
  AddNew(in_INC_IX_Plus_D_Indirect, 'INC', [], 'Adds one to the memory location pointed to by IX plus d.', 23, 0);
  AddNew(in_DEC_IX_Plus_D_Indirect, 'DEC', [], 'Subtracts one from the memory location pointed to by IX plus d.', 23, 0);
  AddNew(in_LD_IX_Plus_D_Indirect_N, 'LD', [ptNumberByte], 'Stores n to the memory location pointed to by IX plus d.', 19, 0);
  AddNew(in_ADD_IX_SP, 'ADD', [ptRegIX, ptRegSP], 'The value of SP is added to IX.', 15, 0);
  AddNew(in_LD_B_IX_Plus_D_Indirect, 'LD', [ptRegB], 'Loads the value pointed to by IX plus d into B.', 19, 0);
  AddNew(in_LD_C_IX_Plus_D_Indirect, 'LD', [ptRegC], 'Loads the value pointed to by IX plus d into C.', 19, 0);
  AddNew(in_LD_D_IX_Plus_D_Indirect, 'LD', [ptRegD], 'Loads the value pointed to by IX plus d into D.', 19, 0);
  AddNew(in_LD_E_IX_Plus_D_Indirect, 'LD', [ptRegE], 'Loads the value pointed to by IX plus d into E.', 19, 0);
  AddNew(in_LD_H_IX_Plus_D_Indirect, 'LD', [ptRegH], 'Loads the value pointed to by IX plus d into H.', 19, 0);
  AddNew(in_LD_L_IX_Plus_D_Indirect, 'LD', [ptRegL], 'Loads the value pointed to by IX plus d into L.', 19, 0);
  AddNew(in_LD_IX_Plus_D_Indirect_B, 'LD', [ptRegB], 'Stores B to the memory location pointed to by IX plus d.', 19, 0);
  AddNew(in_LD_IX_Plus_D_Indirect_C, 'LD', [ptRegC], 'Stores C to the memory location pointed to by IX plus d.', 19, 0);
  AddNew(in_LD_IX_Plus_D_Indirect_D, 'LD', [ptRegD], 'Stores D to the memory location pointed to by IX plus d.', 19, 0);
  AddNew(in_LD_IX_Plus_D_Indirect_E, 'LD', [ptRegE], 'Stores E to the memory location pointed to by IX plus d.', 19, 0);
  AddNew(in_LD_IX_Plus_D_Indirect_H, 'LD', [ptRegH], 'Stores H to the memory location pointed to by IX plus d.', 19, 0);
  AddNew(in_LD_IX_Plus_D_Indirect_L, 'LD', [ptRegL], 'Stores L to the memory location pointed to by IX plus d.', 19, 0);
  AddNew(in_LD_IX_Plus_D_Indirect_A, 'LD', [ptRegA], 'Stores A to the memory location pointed to by IX plus d.', 19, 0);
  AddNew(in_LD_A_IX_Plus_D_Indirect, 'LD', [ptRegA], 'Loads the value pointed to by IX plus d into A.', 19, 0);
  AddNew(in_ADD_A_IX_Plus_D_Indirect, 'ADD', [ptRegA], 'Adds the value pointed to by IX plus d to A.', 19, 0);
  AddNew(in_ADC_A_IX_Plus_D_Indirect, 'ADC', [ptRegA], 'Adds the value pointed to by IX plus d and the carry flag to A.', 19, 0);
  AddNew(in_SUB_IX_Plus_D_Indirect, 'SUB', [], 'Subtracts the value pointed to by IX plus d from A.', 19, 0);
  AddNew(in_SBC_A_IX_Plus_D_Indirect, 'SBC', [ptRegA], 'Subtracts the value pointed to by IX plus d and the carry flag from A.', 19, 0);
  AddNew(in_AND_IX_Plus_D_Indirect, 'AND', [], 'Bitwise AND on A with the value pointed to by IX plus d.', 19, 0);
  AddNew(in_XOR_IX_Plus_D_Indirect, 'XOR', [], 'Bitwise XOR on A with the value pointed to by IX plus d.', 19, 0);
  AddNew(in_OR_IX_Plus_D_Indirect, 'OR', [], 'Bitwise OR on A with the value pointed to by IX plus d.', 19, 0);
  AddNew(in_CP_IX_Plus_D_Indirect, 'CP', [], 'Subtracts the value pointed to by IX plus d from A and affects flags according to the result. A is not modified.', 19, 0);
  AddNew(in_POP_IX, 'POP', [ptRegIX], 'The memory location pointed to by SP is stored into IXL and SP is incremented. The memory location pointed to by SP is stored into IXH and SP is incremented again.', 14, 0);
  AddNew(in_EX_SP_Indirect_IX, 'EX', [ptRegSPIndir, ptRegIX], 'Exchanges (SP) with IXL, and (SP+1) with IXH.', 23, 0);
  AddNew(in_PUSH_IX, 'PUSH', [ptRegIX], 'SP is decremented and IXH is stored into the memory location pointed to by SP. SP is decremented again and IXL is stored into the memory location pointed to by SP.', 15, 0);
  AddNew(in_JP_IX_Indirect, 'JP', [], 'Loads the value of IX into PC.', 8, 0);
  AddNew(in_LD_SP_IX, 'LD', [ptRegSP, ptRegIX], 'Loads the value of IX into SP.', 10, 0);
  AddNew(in_RLC_IX_Plus_D_Indirect, 'RLC', [], 'The contents of the memory location pointed to by IX plus d are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.', 23, 0);
  AddNew(in_RRC_IX_Plus_D_Indirect, 'RRC', [], 'The contents of the memory location pointed to by IX plus d are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.', 23, 0);
  AddNew(in_RL_IX_Plus_D_Indirect, 'RL', [], 'The contents of the memory location pointed to by IX plus d are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.', 23, 0);
  AddNew(in_RR_IX_Plus_D_Indirect, 'RR', [], 'The contents of the memory location pointed to by IX plus d are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.', 23, 0);
  AddNew(in_SLA_IX_Plus_D_Indirect, 'SLA', [], 'The contents of the memory location pointed to by IX plus d are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.', 23, 0);
  AddNew(in_SRA_IX_Plus_D_Indirect, 'SRA', [], 'The contents of the memory location pointed to by IX plus d are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.', 23, 0);
  AddNew(in_SRL_IX_Plus_D_Indirect, 'SRL', [], 'The contents of the memory location pointed to by IX plus d are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.', 23, 0);
  AddNew(in_BIT_0_IX_Plus_D_Indirect, 'BIT', [pt0], 'Tests bit 0 of the memory location pointed to by IX plus d.', 20, 0);
  AddNew(in_BIT_1_IX_Plus_D_Indirect, 'BIT', [pt1], 'Tests bit 1 of the memory location pointed to by IX plus d.', 20, 0);
  AddNew(in_BIT_2_IX_Plus_D_Indirect, 'BIT', [pt2], 'Tests bit 2 of the memory location pointed to by IX plus d.', 20, 0);
  AddNew(in_BIT_3_IX_Plus_D_Indirect, 'BIT', [pt3], 'Tests bit 3 of the memory location pointed to by IX plus d.', 20, 0);
  AddNew(in_BIT_4_IX_Plus_D_Indirect, 'BIT', [pt4], 'Tests bit 4 of the memory location pointed to by IX plus d.', 20, 0);
  AddNew(in_BIT_5_IX_Plus_D_Indirect, 'BIT', [pt5], 'Tests bit 5 of the memory location pointed to by IX plus d.', 20, 0);
  AddNew(in_BIT_6_IX_Plus_D_Indirect, 'BIT', [pt6], 'Tests bit 6 of the memory location pointed to by IX plus d.', 20, 0);
  AddNew(in_BIT_7_IX_Plus_D_Indirect, 'BIT', [pt7], 'Tests bit 7 of the memory location pointed to by IX plus d.', 20, 0);
  AddNew(in_RES_0_IX_Plus_D_Indirect, 'RES', [pt0], 'Resets bit 0 of the memory location pointed to by IX plus d.', 23, 0);
  AddNew(in_RES_1_IX_Plus_D_Indirect, 'RES', [pt1], 'Resets bit 1 of the memory location pointed to by IX plus d.', 23, 0);
  AddNew(in_RES_2_IX_Plus_D_Indirect, 'RES', [pt2], 'Resets bit 2 of the memory location pointed to by IX plus d.', 23, 0);
  AddNew(in_RES_3_IX_Plus_D_Indirect, 'RES', [pt3], 'Resets bit 3 of the memory location pointed to by IX plus d.', 23, 0);
  AddNew(in_RES_4_IX_Plus_D_Indirect, 'RES', [pt4], 'Resets bit 4 of the memory location pointed to by IX plus d.', 23, 0);
  AddNew(in_RES_5_IX_Plus_D_Indirect, 'RES', [pt5], 'Resets bit 5 of the memory location pointed to by IX plus d.', 23, 0);
  AddNew(in_RES_6_IX_Plus_D_Indirect, 'RES', [pt6], 'Resets bit 6 of the memory location pointed to by IX plus d.', 23, 0);
  AddNew(in_RES_7_IX_Plus_D_Indirect, 'RES', [pt7], 'Resets bit 7 of the memory location pointed to by IX plus d.', 23, 0);
  AddNew(in_SET_0_IX_Plus_D_Indirect, 'SET', [pt0], 'Sets bit 0 of the memory location pointed to by IX plus d.', 23, 0);
  AddNew(in_SET_1_IX_Plus_D_Indirect, 'SET', [pt1], 'Sets bit 1 of the memory location pointed to by IX plus d.', 23, 0);
  AddNew(in_SET_2_IX_Plus_D_Indirect, 'SET', [pt2], 'Sets bit 2 of the memory location pointed to by IX plus d.', 23, 0);
  AddNew(in_SET_3_IX_Plus_D_Indirect, 'SET', [pt3], 'Sets bit 3 of the memory location pointed to by IX plus d.', 23, 0);
  AddNew(in_SET_4_IX_Plus_D_Indirect, 'SET', [pt4], 'Sets bit 4 of the memory location pointed to by IX plus d.', 23, 0);
  AddNew(in_SET_5_IX_Plus_D_Indirect, 'SET', [pt5], 'Sets bit 5 of the memory location pointed to by IX plus d.', 23, 0);
  AddNew(in_SET_6_IX_Plus_D_Indirect, 'SET', [pt6], 'Sets bit 6 of the memory location pointed to by IX plus d.', 23, 0);
  AddNew(in_SET_7_IX_Plus_D_Indirect, 'SET', [pt7], 'Sets bit 7 of the memory location pointed to by IX plus d.', 23, 0);
  AddNew(in_ADD_IY_BC, 'ADD', [ptRegIY, ptRegBC], 'The value of BC is added to IY.', 15, 0);
  AddNew(in_ADD_IY_DE, 'ADD', [ptRegIY, ptRegDE], 'The value of DE is added to IY.', 15, 0);
  AddNew(in_LD_IY_NN, 'LD', [ptRegIY, ptNumberWord], 'Loads nn into register IY.', 14, 0);
  AddNew(in_LD_NN_Indirect_IY, 'LD', [ptNumberWordIndir, ptRegIY], 'Stores IY into the memory location pointed to by nn.', 20, 0);
  AddNew(in_INC_IY, 'INC', [ptRegIY], 'Adds one to IY.', 10, 0);
  AddNew(in_ADD_IY_IY, 'ADD', [ptRegIY, ptRegIY], 'The value of IY is added to IY.', 15, 0);
  AddNew(in_LD_IY_NN_Indirect, 'LD', [ptRegIY, ptNumberWordIndir], 'Loads the value pointed to by nn into IY.', 20, 0);
  AddNew(in_DEC_IY, 'DEC', [ptRegIY], 'Subtracts one from IY.', 10, 0);
  AddNew(in_INC_IY_Plus_D_Indirect, 'INC', [], 'Adds one to the memory location pointed to by IY plus d.', 23, 0);
  AddNew(in_DEC_IY_Plus_D_Indirect, 'DEC', [], 'Subtracts one from the memory location pointed to by IY plus d.', 23, 0);
  AddNew(in_LD_IY_Plus_D_Indirect_N, 'LD', [ptNumberByte], 'Stores n to the memory location pointed to by IY plus d.', 19, 0);
  AddNew(in_ADD_IY_SP, 'ADD', [ptRegIY, ptRegSP], 'The value of SP is added to IY.', 15, 0);
  AddNew(in_LD_B_IY_Plus_D_Indirect, 'LD', [ptRegB], 'Loads the value pointed to by IY plus d into B.', 19, 0);
  AddNew(in_LD_C_IY_Plus_D_Indirect, 'LD', [ptRegC], 'Loads the value pointed to by IY plus d into C.', 19, 0);
  AddNew(in_LD_D_IY_Plus_D_Indirect, 'LD', [ptRegD], 'Loads the value pointed to by IY plus d into D.', 19, 0);
  AddNew(in_LD_E_IY_Plus_D_Indirect, 'LD', [ptRegE], 'Loads the value pointed to by IY plus d into E.', 19, 0);
  AddNew(in_LD_H_IY_Plus_D_Indirect, 'LD', [ptRegH], 'Loads the value pointed to by IY plus d into H.', 19, 0);
  AddNew(in_LD_L_IY_Plus_D_Indirect, 'LD', [ptRegL], 'Loads the value pointed to by IY plus d into L.', 19, 0);
  AddNew(in_LD_IY_Plus_D_Indirect_B, 'LD', [ptRegB], 'Stores B to the memory location pointed to by IY plus d.', 19, 0);
  AddNew(in_LD_IY_Plus_D_Indirect_C, 'LD', [ptRegC], 'Stores C to the memory location pointed to by IY plus d.', 19, 0);
  AddNew(in_LD_IY_Plus_D_Indirect_D, 'LD', [ptRegD], 'Stores D to the memory location pointed to by IY plus d.', 19, 0);
  AddNew(in_LD_IY_Plus_D_Indirect_E, 'LD', [ptRegE], 'Stores E to the memory location pointed to by IY plus d.', 19, 0);
  AddNew(in_LD_IY_Plus_D_Indirect_H, 'LD', [ptRegH], 'Stores H to the memory location pointed to by IY plus d.', 19, 0);
  AddNew(in_LD_IY_Plus_D_Indirect_L, 'LD', [ptRegL], 'Stores L to the memory location pointed to by IY plus d.', 19, 0);
  AddNew(in_LD_IY_Plus_D_Indirect_A, 'LD', [ptRegA], 'Stores A to the memory location pointed to by IY plus d.', 19, 0);
  AddNew(in_LD_A_IY_Plus_D_Indirect, 'LD', [ptRegA], 'Loads the value pointed to by IY plus d into A.', 19, 0);
  AddNew(in_ADD_A_IY_Plus_D_Indirect, 'ADD', [ptRegA], 'Adds the value pointed to by IY plus d to A.', 19, 0);
  AddNew(in_ADC_A_IY_Plus_D_Indirect, 'ADC', [ptRegA], 'Adds the value pointed to by IY plus d and the carry flag to A.', 19, 0);
  AddNew(in_SUB_IY_Plus_D_Indirect, 'SUB', [], 'Subtracts the value pointed to by IY plus d from A.', 19, 0);
  AddNew(in_SBC_A_IY_Plus_D_Indirect, 'SBC', [ptRegA], 'Subtracts the value pointed to by IY plus d and the carry flag from A.', 19, 0);
  AddNew(in_AND_IY_Plus_D_Indirect, 'AND', [], 'Bitwise AND on A with the value pointed to by IY plus d.', 19, 0);
  AddNew(in_XOR_IY_Plus_D_Indirect, 'XOR', [], 'Bitwise XOR on A with the value pointed to by IY plus d.', 19, 0);
  AddNew(in_OR_IY_Plus_D_Indirect, 'OR', [], 'Bitwise OR on A with the value pointed to by IY plus d.', 19, 0);
  AddNew(in_CP_IY_Plus_D_Indirect, 'CP', [], 'Subtracts the value pointed to by IY plus d from A and affects flags according to the result. A is not modified.', 19, 0);
  AddNew(in_POP_IY, 'POP', [ptRegIY], 'The memory location pointed to by SP is stored into IYL and SP is incremented. The memory location pointed to by SP is stored into IYH and SP is incremented again.', 14, 0);
  AddNew(in_EX_SP_Indirect_IY, 'EX', [ptRegSPIndir, ptRegIY], 'Exchanges (SP) with IYL, and (SP+1) with IYH.', 23, 0);
  AddNew(in_PUSH_IY, 'PUSH', [ptRegIY], 'SP is decremented and IYH is stored into the memory location pointed to by SP. SP is decremented again and IYL is stored into the memory location pointed to by SP.', 15, 0);
  AddNew(in_JP_IY_Indirect, 'JP', [], 'Loads the value of IY into PC.', 8, 0);
  AddNew(in_LD_SP_IY, 'LD', [ptRegSP, ptRegIY], 'Loads the value of IY into SP.', 10, 0);
  AddNew(in_RLC_IY_Plus_D_Indirect, 'RLC', [], 'The contents of the memory location pointed to by IY plus d are rotated left one bit position. The contents of bit 7 are copied to the carry flag and bit 0.', 23, 0);
  AddNew(in_RRC_IY_Plus_D_Indirect, 'RRC', [], 'The contents of the memory location pointed to by IY plus d are rotated right one bit position. The contents of bit 0 are copied to the carry flag and bit 7.', 23, 0);
  AddNew(in_RL_IY_Plus_D_Indirect, 'RL', [], 'The contents of the memory location pointed to by IY plus d are rotated left one bit position. The contents of bit 7 are copied to the carry flag and the previous contents of the carry flag are copied to bit 0.', 23, 0);
  AddNew(in_RR_IY_Plus_D_Indirect, 'RR', [], 'The contents of the memory location pointed to by IY plus d are rotated right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of the carry flag are copied to bit 7.', 23, 0);
  AddNew(in_SLA_IY_Plus_D_Indirect, 'SLA', [], 'The contents of the memory location pointed to by IY plus d are shifted left one bit position. The contents of bit 7 are copied to the carry flag and a zero is put into bit 0.', 23, 0);
  AddNew(in_SRA_IY_Plus_D_Indirect, 'SRA', [], 'The contents of the memory location pointed to by IY plus d are shifted right one bit position. The contents of bit 0 are copied to the carry flag and the previous contents of bit 7 are unchanged.', 23, 0);
  AddNew(in_SRL_IY_Plus_D_Indirect, 'SRL', [], 'The contents of the memory location pointed to by IY plus d are shifted right one bit position. The contents of bit 0 are copied to the carry flag and a zero is put into bit 7.', 23, 0);
  AddNew(in_BIT_0_IY_Plus_D_Indirect, 'BIT', [pt0], 'Tests bit 0 of the memory location pointed to by IY plus d.', 20, 0);
  AddNew(in_BIT_1_IY_Plus_D_Indirect, 'BIT', [pt1], 'Tests bit 1 of the memory location pointed to by IY plus d.', 20, 0);
  AddNew(in_BIT_2_IY_Plus_D_Indirect, 'BIT', [pt2], 'Tests bit 2 of the memory location pointed to by IY plus d.', 20, 0);
  AddNew(in_BIT_3_IY_Plus_D_Indirect, 'BIT', [pt3], 'Tests bit 3 of the memory location pointed to by IY plus d.', 20, 0);
  AddNew(in_BIT_4_IY_Plus_D_Indirect, 'BIT', [pt4], 'Tests bit 4 of the memory location pointed to by IY plus d.', 20, 0);
  AddNew(in_BIT_5_IY_Plus_D_Indirect, 'BIT', [pt5], 'Tests bit 5 of the memory location pointed to by IY plus d.', 20, 0);
  AddNew(in_BIT_6_IY_Plus_D_Indirect, 'BIT', [pt6], 'Tests bit 6 of the memory location pointed to by IY plus d.', 20, 0);
  AddNew(in_BIT_7_IY_Plus_D_Indirect, 'BIT', [pt7], 'Tests bit 7 of the memory location pointed to by IY plus d.', 20, 0);
  AddNew(in_RES_0_IY_Plus_D_Indirect, 'RES', [pt0], 'Resets bit 0 of the memory location pointed to by IY plus d.', 23, 0);
  AddNew(in_RES_1_IY_Plus_D_Indirect, 'RES', [pt1], 'Resets bit 1 of the memory location pointed to by IY plus d.', 23, 0);
  AddNew(in_RES_2_IY_Plus_D_Indirect, 'RES', [pt2], 'Resets bit 2 of the memory location pointed to by IY plus d.', 23, 0);
  AddNew(in_RES_3_IY_Plus_D_Indirect, 'RES', [pt3], 'Resets bit 3 of the memory location pointed to by IY plus d.', 23, 0);
  AddNew(in_RES_4_IY_Plus_D_Indirect, 'RES', [pt4], 'Resets bit 4 of the memory location pointed to by IY plus d.', 23, 0);
  AddNew(in_RES_5_IY_Plus_D_Indirect, 'RES', [pt5], 'Resets bit 5 of the memory location pointed to by IY plus d.', 23, 0);
  AddNew(in_RES_6_IY_Plus_D_Indirect, 'RES', [pt6], 'Resets bit 6 of the memory location pointed to by IY plus d.', 23, 0);
  AddNew(in_RES_7_IY_Plus_D_Indirect, 'RES', [pt7], 'Resets bit 7 of the memory location pointed to by IY plus d.', 23, 0);
  AddNew(in_SET_0_IY_Plus_D_Indirect, 'SET', [pt0], 'Sets bit 0 of the memory location pointed to by IY plus d.', 23, 0);
  AddNew(in_SET_1_IY_Plus_D_Indirect, 'SET', [pt1], 'Sets bit 1 of the memory location pointed to by IY plus d.', 23, 0);
  AddNew(in_SET_2_IY_Plus_D_Indirect, 'SET', [pt2], 'Sets bit 2 of the memory location pointed to by IY plus d.', 23, 0);
  AddNew(in_SET_3_IY_Plus_D_Indirect, 'SET', [pt3], 'Sets bit 3 of the memory location pointed to by IY plus d.', 23, 0);
  AddNew(in_SET_4_IY_Plus_D_Indirect, 'SET', [pt4], 'Sets bit 4 of the memory location pointed to by IY plus d.', 23, 0);
  AddNew(in_SET_5_IY_Plus_D_Indirect, 'SET', [pt5], 'Sets bit 5 of the memory location pointed to by IY plus d.', 23, 0);
  AddNew(in_SET_6_IY_Plus_D_Indirect, 'SET', [pt6], 'Sets bit 6 of the memory location pointed to by IY plus d.', 23, 0);
  AddNew(in_SET_7_IY_Plus_D_Indirect, 'SET', [pt7], 'Sets bit 7 of the memory location pointed to by IY plus d.', 23, 0);
end;

destructor TInstructionSet.Destroy;
begin
  FreeAndNil(Items);
  inherited;
end;

end.

