Changeset 7


Ignore:
Timestamp:
Apr 19, 2026, 12:16:19 PM (8 days ago)
Author:
chronos
Message:
  • Modified: Updated instruction info with all instructions.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Disassembler.pas

    r6 r7  
    106106      Value := Memory.ReadByte;
    107107      DecodedInstruction.AddOpcode(Value);
    108       Value := $cb00 or Value;
     108      Value := $100 or Value;
    109109    end else
    110110    if Value = $dd then begin
    111111      Value := Memory.ReadByte;
    112112      DecodedInstruction.AddOpcode(Value);
    113       Value := $dd00 or Value;
     113      Value := $200 or Value;
    114114    end else
    115115    if Value = $ed then begin
    116116      Value := Memory.ReadByte;
    117117      DecodedInstruction.AddOpcode(Value);
    118       Value := $ed00 or Value;
     118      Value := $300 or Value;
    119119    end else
    120120    if Value = $fd then begin
    121121      Value := Memory.ReadByte;
    122122      DecodedInstruction.AddOpcode(Value);
    123       Value := $fd00 or Value;
     123      Value := $400 or Value;
    124124    end;
    125125    if (Value >= 0) and (Value <= Integer(High(TInstruction))) then begin
     
    154154          end else
    155155          if InstructionInfo.Params[J] in [ptRegA, ptRegB, ptRegC, ptRegD,
    156             ptRegE, ptRegH, ptRegL, ptRegBC, ptRegDE, ptRegHL, ptRegSP,
    157             ptFlagZ, ptFlagNZ, ptFlagC, ptFlagNC,
    158             ptRegBCIndir, ptRegDEIndir, ptRegHLIndir,
    159             pt00, pt08, pt10, pt18, pt20, pt28, pt30, pt38, pt0, pt1, pt2] then begin
     156            ptRegE, ptRegH, ptRegL, ptRegBC, ptRegDE, ptRegHL, ptRegSP, ptRegIX,
     157            ptRegIY,
     158            ptFlagZ, ptFlagNZ, ptFlagC, ptFlagNC, ptFlagP, ptFlagPO,
     159            ptRegBCIndir, ptRegDEIndir, ptRegHLIndir, ptRegSPIndir,
     160            pt00, pt08, pt10, pt18, pt20, pt28, pt30, pt38,
     161            pt0, pt1, pt2, pt3, pt4, pt5, pt6, pt7] then begin
    160162            DecodedInstruction.Parameters := DecodedInstruction.Parameters + ParamTypeText[InstructionInfo.Params[J]];
    161163          end else
  • trunk/Z80/InstructionSetGen.pas

    r6 r7  
    44
    55uses
    6   Classes, SysUtils;
     6  Classes, SysUtils, Common, Z80InstructionInfo, TypInfo;
    77
    88type
     
    2828  InitInstructions: TStringList;
    2929  Combined: TStringList;
     30  Info: TStringList;
    3031  Cell: string;
    3132  Source: string;
     
    3435  Bytes: string;
    3536  Cycles: string;
     37  CyclesFalseCond: string;
    3638  FlagC: string;
    3739  FlagN: string;
     
    4345  Ident: string;
    4446  Prefix: string;
     47  NameOnly: string;
     48  Params: string;
     49  ParamsPart: string;
     50  InfoParams: string;
     51  ParamType: TParamType;
     52  NewCycles: string;
    4553const
    4654  CellStart = '<td  >';
     
    6876  InitInstructions := TStringList.Create;
    6977  InitInstructions.Add('procedure TCpuZ80.InitInstructions;');
    70   InitInstructions.Add('begin;');
     78  InitInstructions.Add('begin');
     79  Info := TStringList.Create;
     80  Info.Add('constructor TInstructionSet.Create;');
     81  Info.Add('begin');
    7182  repeat
    7283    Cell := GetBlock(Source, CellStart, CellEnd);
     
    7485      Name := GetBlock(Cell, CodeStart, CodeEnd).Trim;
    7586      if Name = '' then Continue;
     87      Name := StringReplace(Name, '<var>', '', [rfReplaceAll]);
     88      Name := StringReplace(Name, '</var>', '', [rfReplaceAll]);
     89      Params := Name;
     90      NameOnly := GetStringPart(Params, ' ');
     91
    7692      Ident := StringReplace(Name.ToUpper, ' ', '_', [rfReplaceAll]);
    7793      Ident := StringReplace(Ident, ',', '_', [rfReplaceAll]);
    78       Ident := StringReplace(Ident, '<VAR>', '', [rfReplaceAll]);
    79       Ident := StringReplace(Ident, '</VAR>', '', [rfReplaceAll]);
    8094      Ident := StringReplace(Ident, '''', '_Pair', [rfReplaceAll]);
    8195      Ident := StringReplace(Ident, '+', '_Plus_', [rfReplaceAll]);
     
    89103        Opcode := Copy(Opcode, 3, MaxInt).Trim;
    90104        if Prefix = 'CB' then Opcode := '1' + Opcode
    91         else if Prefix = 'ED' then Opcode := '2' + Opcode
    92         else if Prefix = 'DD' then Opcode := '3' + Opcode
     105        else if Prefix = 'DD' then Opcode := '2' + Opcode
     106        else if Prefix = 'ED' then Opcode := '3' + Opcode
    93107        else if Prefix = 'FD' then Opcode := '4' + Opcode;
    94108      end;
    95109      Bytes := GetBlock(Cell, DataStart, DataEnd).Trim;
    96110      Cycles := GetBlock(Cell, DataStart, DataEnd).Trim;
     111      if Pos('/', Cycles) >= 1 then begin
     112        NewCycles := GetStringPart(Cycles, '/');
     113        CyclesFalseCond := Cycles;
     114        Cycles := NewCycles;
     115      end else CyclesFalseCond := '0';
     116
    97117      FlagC := GetBlock(Cell, DataStart, DataEnd).Trim;
    98118      FlagN := GetBlock(Cell, DataStart, DataEnd).Trim;
     
    102122      FlagS := GetBlock(Cell, DataStart, DataEnd).Trim;
    103123      Description := GetBlock(Cell, DataStart, DataEnd).Trim;
     124      Description := StringReplace(Description, '<var>', '', [rfReplaceAll]);
     125      Description := StringReplace(Description, '</var>', '', [rfReplaceAll]);
     126
     127      InfoParams := '';
     128      Params := Params.ToUpper;
     129      while Params <> '' do begin
     130        ParamsPart := GetStringPart(Params, ',');
     131        ParamType := StrToParamType(ParamsPart);
     132        if ParamType <> ptNone then
     133          InfoParams := InfoParams + ', ' + GetEnumName(TypeInfo(TParamType), Integer(ParamType));
     134      end;
     135      if Copy(InfoParams, 1, 2) = ', ' then Delete(InfoParams, 1, 2);
     136
     137      Info.Add('  AddNew(in_' + Ident + ', ''' + NameOnly.ToUpper + ''', [' + InfoParams + '], ''' +
     138        StringReplace(Description, '''', '''''', [rfReplaceAll]) + ''', ' +
     139        Cycles + ', ' + CyclesFalseCond + ');');
    104140      Instruction.Add('    in_' + Ident + ' = $' + Opcode + ',');
    105141      InitInstructions.Add('  Instructions[in_' + Ident + '] := ' + Ident + ';');
    106       Head.Add('  procedure ' + Ident + ';');
     142      Head.Add('    procedure ' + Ident + ';');
    107143      Body.Add('procedure TCpuZ80.' + Ident + ';');
    108144      Body.Add('begin');
     145      Body.Add('  NotImplemented;');
    109146      Body.Add('end;');
    110147      Body.Add('');
     
    113150  Instruction.Add('  );');
    114151  Head.Add('end;');
    115   InitInstructions.Add('end;')
    116   ;
     152  InitInstructions.Add('end;');
     153  Info.Add('end;');
     154
    117155  ForceDirectories(Generated);
    118156  Instruction.SaveToFile(Generated + DirectorySeparator + 'Instruction.pas');
    119157  Head.SaveToFile(Generated + DirectorySeparator + 'Head.pas');
    120158  Body.SaveToFile(Generated + DirectorySeparator + 'Body.pas');
    121   InitInstructions.SaveToFile(Generated + DirectorySeparator + 'Body.pas');
     159  InitInstructions.SaveToFile(Generated + DirectorySeparator + 'InitInstructions.pas');
     160  Info.SaveToFile(Generated + DirectorySeparator + 'Info.pas');
    122161
    123162  Combined.Add(Instruction.Text);
     
    133172  Body.Free;
    134173  InitInstructions.Free;
     174  Info.Free;
    135175  Lines.Free;
    136176end;
  • trunk/Z80/Z80.pas

    r6 r7  
    6565    procedure Djnz;
    6666    procedure Jp(Condition: Boolean);
    67     procedure Halt;
    68     procedure Ret(Condition: Boolean);
     67    //procedure Halt;
     68    procedure RetCond(Condition: Boolean);
     69    procedure NotImplemented;
     70
    6971    // Instruction methods
    7072    procedure NOP;
    71     procedure LD_HL_nn;
    72     procedure LD_BC_nn;
    73     procedure LD_DE_nn;
    74     procedure LD_SP_nn;
    75     procedure JP_nn;
    76     procedure LD_A_n;
    77     procedure LD_B_n;
    78     procedure LD_A_C;
    79     procedure LD_HL_Indirect_n;
    80     procedure LD_nn_Indirect_A;
     73    procedure LD_BC_NN;
     74    procedure LD_BC_Indirect_A;
     75    procedure INC_BC;
     76    procedure INC_B;
     77    procedure DEC_B;
     78    procedure LD_B_N;
     79    procedure RLCA;
     80    procedure EX_AF_AF_Pair;
     81    procedure ADD_HL_BC;
     82    procedure LD_A_BC_Indirect;
     83    procedure DEC_BC;
     84    procedure INC_C;
     85    procedure DEC_C;
     86    procedure LD_C_N;
     87    procedure RRCA;
     88    procedure DJNZ_D;
     89    procedure LD_DE_NN;
     90    procedure LD_DE_Indirect_A;
     91    procedure INC_DE;
     92    procedure INC_D;
     93    procedure DEC_D;
     94    procedure LD_D_N;
     95    procedure RLA;
     96    procedure JR_D;
     97    procedure ADD_HL_DE;
     98    procedure LD_A_DE_Indirect;
     99    procedure DEC_DE;
     100    procedure INC_E;
     101    procedure DEC_E;
     102    procedure LD_E_N;
     103    procedure RRA;
     104    procedure JR_NZ_D;
     105    procedure LD_HL_NN;
     106    procedure LD_NN_Indirect_HL;
     107    procedure INC_HL;
     108    procedure INC_H;
     109    procedure DEC_H;
     110    procedure LD_H_N;
     111    procedure DAA;
     112    procedure JR_Z_D;
     113    procedure ADD_HL_HL;
     114    procedure LD_HL_NN_Indirect;
     115    procedure DEC_HL;
     116    procedure INC_L;
     117    procedure DEC_L;
     118    procedure LD_L_N;
     119    procedure CPL;
     120    procedure JR_NC_D;
     121    procedure LD_SP_NN;
     122    procedure LD_NN_Indirect_A;
     123    procedure INC_SP;
     124    procedure INC_HL_Indirect;
     125    procedure DEC_HL_Indirect;
     126    procedure LD_HL_Indirect_N;
     127    procedure SCF;
     128    procedure JR_C_D;
     129    procedure ADD_HL_SP;
     130    procedure LD_A_NN_Indirect;
     131    procedure DEC_SP;
     132    procedure INC_A;
     133    procedure DEC_A;
     134    procedure LD_A_N;
     135    procedure CCF;
     136    procedure LD_B_B;
     137    procedure LD_B_C;
     138    procedure LD_B_D;
     139    procedure LD_B_E;
     140    procedure LD_B_H;
     141    procedure LD_B_L;
     142    procedure LD_B_HL_Indirect;
     143    procedure LD_B_A;
     144    procedure LD_C_B;
     145    procedure LD_C_C;
     146    procedure LD_C_D;
     147    procedure LD_C_E;
     148    procedure LD_C_H;
     149    procedure LD_C_L;
     150    procedure LD_C_HL_Indirect;
     151    procedure LD_C_A;
     152    procedure LD_D_B;
     153    procedure LD_D_C;
     154    procedure LD_D_D;
     155    procedure LD_D_E;
     156    procedure LD_D_H;
     157    procedure LD_D_L;
     158    procedure LD_D_HL_Indirect;
     159    procedure LD_D_A;
     160    procedure LD_E_B;
     161    procedure LD_E_C;
     162    procedure LD_E_D;
     163    procedure LD_E_E;
     164    procedure LD_E_H;
     165    procedure LD_E_L;
     166    procedure LD_E_HL_Indirect;
     167    procedure LD_E_A;
     168    procedure LD_H_B;
     169    procedure LD_H_C;
     170    procedure LD_H_D;
     171    procedure LD_H_E;
     172    procedure LD_H_H;
     173    procedure LD_H_L;
     174    procedure LD_H_HL_Indirect;
     175    procedure LD_H_A;
     176    procedure LD_L_B;
     177    procedure LD_L_C;
     178    procedure LD_L_D;
     179    procedure LD_L_E;
     180    procedure LD_L_H;
     181    procedure LD_L_L;
     182    procedure LD_L_HL_Indirect;
     183    procedure LD_L_A;
     184    procedure LD_HL_Indirect_B;
     185    procedure LD_HL_Indirect_C;
    81186    procedure LD_HL_Indirect_D;
    82187    procedure LD_HL_Indirect_E;
    83     procedure LD_C_HL_Indirect;
     188    procedure LD_HL_Indirect_H;
     189    procedure LD_HL_Indirect_L;
     190    procedure HALT;
     191    procedure LD_HL_Indirect_A;
     192    procedure LD_A_B;
     193    procedure LD_A_C;
     194    procedure LD_A_D;
     195    procedure LD_A_E;
     196    procedure LD_A_H;
     197    procedure LD_A_L;
    84198    procedure LD_A_HL_Indirect;
    85     procedure LD_BC_Indirect_A;
     199    procedure LD_A_A;
     200    procedure ADD_A_B;
     201    procedure ADD_A_C;
     202    procedure ADD_A_D;
     203    procedure ADD_A_E;
     204    procedure ADD_A_H;
     205    procedure ADD_A_L;
     206    procedure ADD_A_HL_Indirect;
     207    procedure ADD_A_A;
     208    procedure ADC_A_B;
     209    procedure ADC_A_C;
     210    procedure ADC_A_D;
     211    procedure ADC_A_E;
     212    procedure ADC_A_H;
     213    procedure ADC_A_L;
     214    procedure ADC_A_HL_Indirect;
     215    procedure ADC_A_A;
     216    procedure SUB_B;
     217    procedure SUB_C;
     218    procedure SUB_D;
     219    procedure SUB_E;
     220    procedure SUB_H;
     221    procedure SUB_L;
     222    procedure SUB_HL_Indirect;
     223    procedure SUB_A;
     224    procedure SBC_A_B;
     225    procedure SBC_A_C;
     226    procedure SBC_A_D;
     227    procedure SBC_A_E;
     228    procedure SBC_A_H;
     229    procedure SBC_A_L;
     230    procedure SBC_A_HL_Indirect;
     231    procedure SBC_A_A;
     232    procedure AND_B;
     233    procedure AND_C;
     234    procedure AND_D;
     235    procedure AND_E;
     236    procedure AND_H;
     237    procedure AND_L;
     238    procedure AND_HL_Indirect;
     239    procedure AND_A;
     240    procedure XOR_B;
     241    procedure XOR_C;
     242    procedure XOR_D;
     243    procedure XOR_E;
     244    procedure XOR_H;
     245    procedure XOR_L;
     246    procedure XOR_HL_Indirect;
     247    procedure XOR_A;
     248    procedure OR_B;
     249    procedure OR_C;
     250    procedure OR_D;
     251    procedure OR_E;
     252    procedure OR_H;
     253    procedure OR_L;
     254    procedure OR_HL_Indirect;
     255    procedure OR_A;
     256    procedure CP_B;
     257    procedure CP_C;
     258    procedure CP_D;
     259    procedure CP_E;
     260    procedure CP_H;
     261    procedure CP_L;
     262    procedure CP_HL_Indirect;
     263    procedure CP_A;
     264    procedure RET_NZ;
     265    procedure POP_BC;
     266    procedure JP_NZ_NN;
     267    procedure JP_NN;
     268    procedure CALL_NZ_NN;
     269    procedure PUSH_BC;
     270    procedure ADD_A_N;
     271    procedure RST_00H;
     272    procedure RET_Z;
     273    procedure RET;
     274    procedure JP_Z_NN;
     275    procedure CALL_Z_NN;
     276    procedure CALL_NN;
     277    procedure ADC_A_N;
     278    procedure RST_08H;
     279    procedure RET_NC;
     280    procedure POP_DE;
     281    procedure JP_NC_NN;
     282    procedure OUT_N_Indirect_A;
     283    procedure CALL_NC_NN;
     284    procedure PUSH_DE;
     285    procedure SUB_N;
     286    procedure RST_10H;
     287    procedure RET_C;
     288    procedure EXX;
     289    procedure JP_C_NN;
     290    procedure IN_A_N_Indirect;
     291    procedure CALL_C_NN;
     292    procedure SBC_A_N;
     293    procedure RST_18H;
     294    procedure RET_PO;
     295    procedure POP_HL;
     296    procedure JP_PO_NN;
     297    procedure EX_SP_Indirect_HL;
     298    procedure CALL_PO_NN;
     299    procedure PUSH_HL;
     300    procedure AND_N;
     301    procedure RST_20H;
     302    procedure RET_PE;
     303    procedure JP_HL_Indirect;
     304    procedure JP_PE_NN;
     305    procedure EX_DE_HL;
     306    procedure CALL_PE_NN;
     307    procedure XOR_N;
     308    procedure RST_28H;
     309    procedure RET_P;
     310    procedure POP_AF;
     311    procedure JP_P_NN;
     312    procedure DI;
     313    procedure CALL_P_NN;
     314    procedure PUSH_AF;
     315    procedure OR_N;
     316    procedure RST_30H;
     317    procedure RET_M;
     318    procedure LD_SP_HL;
     319    procedure JP_M_NN;
     320    procedure EI;
     321    procedure CALL_M_NN;
     322    procedure CP_N;
     323    procedure RST_38H;
     324    procedure IN_B_C_Indirect;
     325    procedure OUT_C_Indirect_B;
     326    procedure SBC_HL_BC;
     327    procedure LD_NN_Indirect_BC;
     328    procedure NEG;
     329    procedure RETN;
     330    procedure IM_0;
     331    procedure LD_I_A;
     332    procedure IN_C_C_Indirect;
     333    procedure OUT_C_Indirect_C;
     334    procedure ADC_HL_BC;
     335    procedure LD_BC_NN_Indirect;
     336    procedure RETI;
     337    procedure LD_R_A;
     338    procedure IN_D_C_Indirect;
     339    procedure OUT_C_Indirect_D;
     340    procedure SBC_HL_DE;
     341    procedure LD_NN_Indirect_DE;
     342    procedure IM_1;
     343    procedure LD_A_I;
     344    procedure IN_E_C_Indirect;
     345    procedure OUT_C_Indirect_E;
     346    procedure ADC_HL_DE;
     347    procedure LD_DE_NN_Indirect;
     348    procedure IM_2;
     349    procedure LD_A_R;
     350    procedure IN_H_C_Indirect;
     351    procedure OUT_C_Indirect_H;
     352    procedure SBC_HL_HL;
     353    procedure RRD;
     354    procedure IN_L_C_Indirect;
     355    procedure OUT_C_Indirect_L;
     356    procedure ADC_HL_HL;
     357    procedure RLD;
     358    procedure SBC_HL_SP;
     359    procedure LD_NN_Indirect_SP;
     360    procedure IN_A_C_Indirect;
     361    procedure OUT_C_Indirect_A;
     362    procedure ADC_HL_SP;
     363    procedure LD_SP_NN_Indirect;
     364    procedure LDI;
     365    procedure CPI;
     366    procedure INI;
     367    procedure OUTI;
     368    procedure LDD;
     369    procedure CPD;
     370    procedure IND;
     371    procedure OUTD;
     372    procedure LDIR;
     373    procedure CPIR;
     374    procedure INIR;
     375    procedure OTIR;
     376    procedure LDDR;
     377    procedure CPDR;
     378    procedure INDR;
     379    procedure OTDR;
     380    procedure RLC_B;
     381    procedure RLC_C;
     382    procedure RLC_D;
     383    procedure RLC_E;
     384    procedure RLC_H;
     385    procedure RLC_L;
     386    procedure RLC_HL_Indirect;
     387    procedure RLC_A;
     388    procedure RRC_B;
     389    procedure RRC_C;
     390    procedure RRC_D;
     391    procedure RRC_E;
     392    procedure RRC_H;
     393    procedure RRC_L;
     394    procedure RRC_HL_Indirect;
     395    procedure RRC_A;
     396    procedure RL_B;
     397    procedure RL_C;
     398    procedure RL_D;
     399    procedure RL_E;
     400    procedure RL_H;
     401    procedure RL_L;
     402    procedure RL_HL_Indirect;
     403    procedure RL_A;
     404    procedure RR_B;
     405    procedure RR_C;
     406    procedure RR_D;
     407    procedure RR_E;
     408    procedure RR_H;
     409    procedure RR_L;
     410    procedure RR_HL_Indirect;
     411    procedure RR_A;
     412    procedure SLA_B;
     413    procedure SLA_C;
     414    procedure SLA_D;
     415    procedure SLA_E;
     416    procedure SLA_H;
     417    procedure SLA_L;
     418    procedure SLA_HL_Indirect;
     419    procedure SLA_A;
     420    procedure SRA_B;
     421    procedure SRA_C;
     422    procedure SRA_D;
     423    procedure SRA_E;
     424    procedure SRA_H;
     425    procedure SRA_L;
     426    procedure SRA_HL_Indirect;
     427    procedure SRA_A;
     428    procedure SRL_B;
     429    procedure SRL_C;
     430    procedure SRL_D;
     431    procedure SRL_E;
     432    procedure SRL_H;
     433    procedure SRL_L;
     434    procedure SRL_HL_Indirect;
     435    procedure SRL_A;
     436    procedure BIT_0_B;
     437    procedure BIT_0_C;
     438    procedure BIT_0_D;
     439    procedure BIT_0_E;
     440    procedure BIT_0_H;
     441    procedure BIT_0_L;
     442    procedure BIT_0_HL_Indirect;
     443    procedure BIT_0_A;
     444    procedure BIT_1_B;
     445    procedure BIT_1_C;
     446    procedure BIT_1_D;
     447    procedure BIT_1_E;
     448    procedure BIT_1_H;
     449    procedure BIT_1_L;
     450    procedure BIT_1_HL_Indirect;
     451    procedure BIT_1_A;
     452    procedure BIT_2_B;
     453    procedure BIT_2_C;
     454    procedure BIT_2_D;
     455    procedure BIT_2_E;
     456    procedure BIT_2_H;
     457    procedure BIT_2_L;
     458    procedure BIT_2_HL_Indirect;
     459    procedure BIT_2_A;
     460    procedure BIT_3_B;
     461    procedure BIT_3_C;
     462    procedure BIT_3_D;
     463    procedure BIT_3_E;
     464    procedure BIT_3_H;
     465    procedure BIT_3_L;
     466    procedure BIT_3_HL_Indirect;
     467    procedure BIT_3_A;
     468    procedure BIT_4_B;
     469    procedure BIT_4_C;
     470    procedure BIT_4_D;
     471    procedure BIT_4_E;
     472    procedure BIT_4_H;
     473    procedure BIT_4_L;
     474    procedure BIT_4_HL_Indirect;
     475    procedure BIT_4_A;
     476    procedure BIT_5_B;
     477    procedure BIT_5_C;
     478    procedure BIT_5_D;
     479    procedure BIT_5_E;
     480    procedure BIT_5_H;
     481    procedure BIT_5_L;
     482    procedure BIT_5_HL_Indirect;
     483    procedure BIT_5_A;
     484    procedure BIT_6_B;
     485    procedure BIT_6_C;
     486    procedure BIT_6_D;
     487    procedure BIT_6_E;
     488    procedure BIT_6_H;
     489    procedure BIT_6_L;
     490    procedure BIT_6_HL_Indirect;
     491    procedure BIT_6_A;
     492    procedure BIT_7_B;
     493    procedure BIT_7_C;
     494    procedure BIT_7_D;
     495    procedure BIT_7_E;
     496    procedure BIT_7_H;
     497    procedure BIT_7_L;
     498    procedure BIT_7_HL_Indirect;
     499    procedure BIT_7_A;
     500    procedure RES_0_B;
     501    procedure RES_0_C;
     502    procedure RES_0_D;
     503    procedure RES_0_E;
     504    procedure RES_0_H;
     505    procedure RES_0_L;
     506    procedure RES_0_HL_Indirect;
     507    procedure RES_0_A;
     508    procedure RES_1_B;
     509    procedure RES_1_C;
     510    procedure RES_1_D;
     511    procedure RES_1_E;
     512    procedure RES_1_H;
     513    procedure RES_1_L;
     514    procedure RES_1_HL_Indirect;
     515    procedure RES_1_A;
     516    procedure RES_2_B;
     517    procedure RES_2_C;
     518    procedure RES_2_D;
     519    procedure RES_2_E;
     520    procedure RES_2_H;
     521    procedure RES_2_L;
     522    procedure RES_2_HL_Indirect;
     523    procedure RES_2_A;
     524    procedure RES_3_B;
     525    procedure RES_3_C;
     526    procedure RES_3_D;
     527    procedure RES_3_E;
     528    procedure RES_3_H;
     529    procedure RES_3_L;
     530    procedure RES_3_HL_Indirect;
     531    procedure RES_3_A;
     532    procedure RES_4_B;
     533    procedure RES_4_C;
     534    procedure RES_4_D;
     535    procedure RES_4_E;
     536    procedure RES_4_H;
     537    procedure RES_4_L;
     538    procedure RES_4_HL_Indirect;
     539    procedure RES_4_A;
     540    procedure RES_5_B;
     541    procedure RES_5_C;
     542    procedure RES_5_D;
     543    procedure RES_5_E;
     544    procedure RES_5_H;
     545    procedure RES_5_L;
     546    procedure RES_5_HL_Indirect;
     547    procedure RES_5_A;
     548    procedure RES_6_B;
     549    procedure RES_6_C;
     550    procedure RES_6_D;
     551    procedure RES_6_E;
     552    procedure RES_6_H;
     553    procedure RES_6_L;
     554    procedure RES_6_HL_Indirect;
     555    procedure RES_6_A;
     556    procedure RES_7_B;
     557    procedure RES_7_C;
     558    procedure RES_7_D;
     559    procedure RES_7_E;
     560    procedure RES_7_H;
     561    procedure RES_7_L;
     562    procedure RES_7_HL_Indirect;
     563    procedure RES_7_A;
     564    procedure SET_0_B;
     565    procedure SET_0_C;
     566    procedure SET_0_D;
     567    procedure SET_0_E;
     568    procedure SET_0_H;
     569    procedure SET_0_L;
     570    procedure SET_0_HL_Indirect;
     571    procedure SET_0_A;
     572    procedure SET_1_B;
     573    procedure SET_1_C;
     574    procedure SET_1_D;
     575    procedure SET_1_E;
     576    procedure SET_1_H;
     577    procedure SET_1_L;
     578    procedure SET_1_HL_Indirect;
     579    procedure SET_1_A;
     580    procedure SET_2_B;
     581    procedure SET_2_C;
     582    procedure SET_2_D;
     583    procedure SET_2_E;
     584    procedure SET_2_H;
     585    procedure SET_2_L;
     586    procedure SET_2_HL_Indirect;
     587    procedure SET_2_A;
     588    procedure SET_3_B;
     589    procedure SET_3_C;
     590    procedure SET_3_D;
     591    procedure SET_3_E;
     592    procedure SET_3_H;
     593    procedure SET_3_L;
     594    procedure SET_3_HL_Indirect;
     595    procedure SET_3_A;
     596    procedure SET_4_B;
     597    procedure SET_4_C;
     598    procedure SET_4_D;
     599    procedure SET_4_E;
     600    procedure SET_4_H;
     601    procedure SET_4_L;
     602    procedure SET_4_HL_Indirect;
     603    procedure SET_4_A;
     604    procedure SET_5_B;
     605    procedure SET_5_C;
     606    procedure SET_5_D;
     607    procedure SET_5_E;
     608    procedure SET_5_H;
     609    procedure SET_5_L;
     610    procedure SET_5_HL_Indirect;
     611    procedure SET_5_A;
     612    procedure SET_6_B;
     613    procedure SET_6_C;
     614    procedure SET_6_D;
     615    procedure SET_6_E;
     616    procedure SET_6_H;
     617    procedure SET_6_L;
     618    procedure SET_6_HL_Indirect;
     619    procedure SET_6_A;
     620    procedure SET_7_B;
     621    procedure SET_7_C;
     622    procedure SET_7_D;
     623    procedure SET_7_E;
     624    procedure SET_7_H;
     625    procedure SET_7_L;
     626    procedure SET_7_HL_Indirect;
     627    procedure SET_7_A;
     628    procedure ADD_IX_BC;
     629    procedure ADD_IX_DE;
     630    procedure LD_IX_NN;
     631    procedure LD_NN_Indirect_IX;
     632    procedure INC_IX;
     633    procedure ADD_IX_IX;
     634    procedure LD_IX_NN_Indirect;
     635    procedure DEC_IX;
     636    procedure INC_IX_Plus_D_Indirect;
     637    procedure DEC_IX_Plus_D_Indirect;
     638    procedure LD_IX_Plus_D_Indirect_N;
     639    procedure ADD_IX_SP;
     640    procedure LD_B_IX_Plus_D_Indirect;
     641    procedure LD_C_IX_Plus_D_Indirect;
     642    procedure LD_D_IX_Plus_D_Indirect;
     643    procedure LD_E_IX_Plus_D_Indirect;
     644    procedure LD_H_IX_Plus_D_Indirect;
     645    procedure LD_L_IX_Plus_D_Indirect;
     646    procedure LD_IX_Plus_D_Indirect_B;
     647    procedure LD_IX_Plus_D_Indirect_C;
     648    procedure LD_IX_Plus_D_Indirect_D;
     649    procedure LD_IX_Plus_D_Indirect_E;
     650    procedure LD_IX_Plus_D_Indirect_H;
     651    procedure LD_IX_Plus_D_Indirect_L;
     652    procedure LD_IX_Plus_D_Indirect_A;
     653    procedure LD_A_IX_Plus_D_Indirect;
     654    procedure ADD_A_IX_Plus_D_Indirect;
     655    procedure ADC_A_IX_Plus_D_Indirect;
     656    procedure SUB_IX_Plus_D_Indirect;
     657    procedure SBC_A_IX_Plus_D_Indirect;
     658    procedure AND_IX_Plus_D_Indirect;
     659    procedure XOR_IX_Plus_D_Indirect;
     660    procedure OR_IX_Plus_D_Indirect;
     661    procedure CP_IX_Plus_D_Indirect;
     662    procedure POP_IX;
     663    procedure EX_SP_Indirect_IX;
     664    procedure PUSH_IX;
     665    procedure JP_IX_Indirect;
     666    procedure LD_SP_IX;
     667    procedure RLC_IX_Plus_D_Indirect;
     668    procedure RRC_IX_Plus_D_Indirect;
     669    procedure RL_IX_Plus_D_Indirect;
     670    procedure RR_IX_Plus_D_Indirect;
     671    procedure SLA_IX_Plus_D_Indirect;
     672    procedure SRA_IX_Plus_D_Indirect;
     673    procedure SRL_IX_Plus_D_Indirect;
     674    procedure BIT_0_IX_Plus_D_Indirect;
     675    procedure BIT_1_IX_Plus_D_Indirect;
     676    procedure BIT_2_IX_Plus_D_Indirect;
     677    procedure BIT_3_IX_Plus_D_Indirect;
     678    procedure BIT_4_IX_Plus_D_Indirect;
     679    procedure BIT_5_IX_Plus_D_Indirect;
     680    procedure BIT_6_IX_Plus_D_Indirect;
     681    procedure BIT_7_IX_Plus_D_Indirect;
     682    procedure RES_0_IX_Plus_D_Indirect;
     683    procedure RES_1_IX_Plus_D_Indirect;
     684    procedure RES_2_IX_Plus_D_Indirect;
     685    procedure RES_3_IX_Plus_D_Indirect;
     686    procedure RES_4_IX_Plus_D_Indirect;
     687    procedure RES_5_IX_Plus_D_Indirect;
     688    procedure RES_6_IX_Plus_D_Indirect;
     689    procedure RES_7_IX_Plus_D_Indirect;
     690    procedure SET_0_IX_Plus_D_Indirect;
     691    procedure SET_1_IX_Plus_D_Indirect;
     692    procedure SET_2_IX_Plus_D_Indirect;
     693    procedure SET_3_IX_Plus_D_Indirect;
     694    procedure SET_4_IX_Plus_D_Indirect;
     695    procedure SET_5_IX_Plus_D_Indirect;
     696    procedure SET_6_IX_Plus_D_Indirect;
     697    procedure SET_7_IX_Plus_D_Indirect;
     698    procedure ADD_IY_BC;
     699    procedure ADD_IY_DE;
     700    procedure LD_IY_NN;
     701    procedure LD_NN_Indirect_IY;
     702    procedure INC_IY;
     703    procedure ADD_IY_IY;
     704    procedure LD_IY_NN_Indirect;
     705    procedure DEC_IY;
     706    procedure INC_IY_Plus_D_Indirect;
     707    procedure DEC_IY_Plus_D_Indirect;
     708    procedure LD_IY_Plus_D_Indirect_N;
     709    procedure ADD_IY_SP;
     710    procedure LD_B_IY_Plus_D_Indirect;
     711    procedure LD_C_IY_Plus_D_Indirect;
     712    procedure LD_D_IY_Plus_D_Indirect;
     713    procedure LD_E_IY_Plus_D_Indirect;
     714    procedure LD_H_IY_Plus_D_Indirect;
     715    procedure LD_L_IY_Plus_D_Indirect;
     716    procedure LD_IY_Plus_D_Indirect_B;
     717    procedure LD_IY_Plus_D_Indirect_C;
     718    procedure LD_IY_Plus_D_Indirect_D;
     719    procedure LD_IY_Plus_D_Indirect_E;
     720    procedure LD_IY_Plus_D_Indirect_H;
     721    procedure LD_IY_Plus_D_Indirect_L;
     722    procedure LD_IY_Plus_D_Indirect_A;
     723    procedure LD_A_IY_Plus_D_Indirect;
     724    procedure ADD_A_IY_Plus_D_Indirect;
     725    procedure ADC_A_IY_Plus_D_Indirect;
     726    procedure SUB_IY_Plus_D_Indirect;
     727    procedure SBC_A_IY_Plus_D_Indirect;
     728    procedure AND_IY_Plus_D_Indirect;
     729    procedure XOR_IY_Plus_D_Indirect;
     730    procedure OR_IY_Plus_D_Indirect;
     731    procedure CP_IY_Plus_D_Indirect;
     732    procedure POP_IY;
     733    procedure EX_SP_Indirect_IY;
     734    procedure PUSH_IY;
     735    procedure JP_IY_Indirect;
     736    procedure LD_SP_IY;
     737    procedure RLC_IY_Plus_D_Indirect;
     738    procedure RRC_IY_Plus_D_Indirect;
     739    procedure RL_IY_Plus_D_Indirect;
     740    procedure RR_IY_Plus_D_Indirect;
     741    procedure SLA_IY_Plus_D_Indirect;
     742    procedure SRA_IY_Plus_D_Indirect;
     743    procedure SRL_IY_Plus_D_Indirect;
     744    procedure BIT_0_IY_Plus_D_Indirect;
     745    procedure BIT_1_IY_Plus_D_Indirect;
     746    procedure BIT_2_IY_Plus_D_Indirect;
     747    procedure BIT_3_IY_Plus_D_Indirect;
     748    procedure BIT_4_IY_Plus_D_Indirect;
     749    procedure BIT_5_IY_Plus_D_Indirect;
     750    procedure BIT_6_IY_Plus_D_Indirect;
     751    procedure BIT_7_IY_Plus_D_Indirect;
     752    procedure RES_0_IY_Plus_D_Indirect;
     753    procedure RES_1_IY_Plus_D_Indirect;
     754    procedure RES_2_IY_Plus_D_Indirect;
     755    procedure RES_3_IY_Plus_D_Indirect;
     756    procedure RES_4_IY_Plus_D_Indirect;
     757    procedure RES_5_IY_Plus_D_Indirect;
     758    procedure RES_6_IY_Plus_D_Indirect;
     759    procedure RES_7_IY_Plus_D_Indirect;
     760    procedure SET_0_IY_Plus_D_Indirect;
     761    procedure SET_1_IY_Plus_D_Indirect;
     762    procedure SET_2_IY_Plus_D_Indirect;
     763    procedure SET_3_IY_Plus_D_Indirect;
     764    procedure SET_4_IY_Plus_D_Indirect;
     765    procedure SET_5_IY_Plus_D_Indirect;
     766    procedure SET_6_IY_Plus_D_Indirect;
     767    procedure SET_7_IY_Plus_D_Indirect;
     768
    86769    procedure InitInstructions;
    87770  public
     
    252935end;
    253936
    254 procedure TCpuZ80.Halt;
    255 begin
    256   FThread.Terminate;
    257 end;
    258 
    259 procedure TCpuZ80.Ret(Condition: Boolean);
     937procedure TCpuZ80.RetCond(Condition: Boolean);
    260938begin
    261939  if Condition then begin
     
    268946end;
    269947
     948procedure TCpuZ80.NotImplemented;
     949begin
     950  Dec(PC);
     951  DoMessage('Not implemented instruction ' + IntToHex(Word(Instruction), 4) +
     952    ' on address ' + IntToHex(Word(PC), 4));
     953  Halt;
     954end;
     955
    270956procedure TCpuZ80.InitInstructions;
    271957begin
    272958  Instructions[in_NOP] := NOP;
    273   Instructions[in_HALT] := Halt;
    274   Instructions[in_LD_HL_nn] := LD_HL_nn;
    275   Instructions[in_LD_BC_nn] := LD_BC_nn;
    276   Instructions[in_LD_DE_nn] := LD_DE_nn;
    277   Instructions[in_LD_SP_nn] := LD_SP_nn;
    278   Instructions[in_JP_nn] := JP_nn;
    279   Instructions[in_LD_A_n] := LD_A_n;
    280   Instructions[in_LD_B_n] := LD_B_n;
    281   Instructions[in_LD_A_C] := LD_A_C;
    282   Instructions[in_LD_HL_Indirect_n] := LD_HL_Indirect_n;
    283   Instructions[in_LD_nn_Indirect_A] := LD_nn_Indirect_A;
     959  Instructions[in_LD_BC_NN] := LD_BC_NN;
     960  Instructions[in_LD_BC_Indirect_A] := LD_BC_Indirect_A;
     961  Instructions[in_INC_BC] := INC_BC;
     962  Instructions[in_INC_B] := INC_B;
     963  Instructions[in_DEC_B] := DEC_B;
     964  Instructions[in_LD_B_N] := LD_B_N;
     965  Instructions[in_RLCA] := RLCA;
     966  Instructions[in_EX_AF_AF_Pair] := EX_AF_AF_Pair;
     967  Instructions[in_ADD_HL_BC] := ADD_HL_BC;
     968  Instructions[in_LD_A_BC_Indirect] := LD_A_BC_Indirect;
     969  Instructions[in_DEC_BC] := DEC_BC;
     970  Instructions[in_INC_C] := INC_C;
     971  Instructions[in_DEC_C] := DEC_C;
     972  Instructions[in_LD_C_N] := LD_C_N;
     973  Instructions[in_RRCA] := RRCA;
     974  Instructions[in_DJNZ_D] := DJNZ_D;
     975  Instructions[in_LD_DE_NN] := LD_DE_NN;
     976  Instructions[in_LD_DE_Indirect_A] := LD_DE_Indirect_A;
     977  Instructions[in_INC_DE] := INC_DE;
     978  Instructions[in_INC_D] := INC_D;
     979  Instructions[in_DEC_D] := DEC_D;
     980  Instructions[in_LD_D_N] := LD_D_N;
     981  Instructions[in_RLA] := RLA;
     982  Instructions[in_JR_D] := JR_D;
     983  Instructions[in_ADD_HL_DE] := ADD_HL_DE;
     984  Instructions[in_LD_A_DE_Indirect] := LD_A_DE_Indirect;
     985  Instructions[in_DEC_DE] := DEC_DE;
     986  Instructions[in_INC_E] := INC_E;
     987  Instructions[in_DEC_E] := DEC_E;
     988  Instructions[in_LD_E_N] := LD_E_N;
     989  Instructions[in_RRA] := RRA;
     990  Instructions[in_JR_NZ_D] := JR_NZ_D;
     991  Instructions[in_LD_HL_NN] := LD_HL_NN;
     992  Instructions[in_LD_NN_Indirect_HL] := LD_NN_Indirect_HL;
     993  Instructions[in_INC_HL] := INC_HL;
     994  Instructions[in_INC_H] := INC_H;
     995  Instructions[in_DEC_H] := DEC_H;
     996  Instructions[in_LD_H_N] := LD_H_N;
     997  Instructions[in_DAA] := DAA;
     998  Instructions[in_JR_Z_D] := JR_Z_D;
     999  Instructions[in_ADD_HL_HL] := ADD_HL_HL;
     1000  Instructions[in_LD_HL_NN_Indirect] := LD_HL_NN_Indirect;
     1001  Instructions[in_DEC_HL] := DEC_HL;
     1002  Instructions[in_INC_L] := INC_L;
     1003  Instructions[in_DEC_L] := DEC_L;
     1004  Instructions[in_LD_L_N] := LD_L_N;
     1005  Instructions[in_CPL] := CPL;
     1006  Instructions[in_JR_NC_D] := JR_NC_D;
     1007  Instructions[in_LD_SP_NN] := LD_SP_NN;
     1008  Instructions[in_LD_NN_Indirect_A] := LD_NN_Indirect_A;
     1009  Instructions[in_INC_SP] := INC_SP;
     1010  Instructions[in_INC_HL_Indirect] := INC_HL_Indirect;
     1011  Instructions[in_DEC_HL_Indirect] := DEC_HL_Indirect;
     1012  Instructions[in_LD_HL_Indirect_N] := LD_HL_Indirect_N;
     1013  Instructions[in_SCF] := SCF;
     1014  Instructions[in_JR_C_D] := JR_C_D;
     1015  Instructions[in_ADD_HL_SP] := ADD_HL_SP;
     1016  Instructions[in_LD_A_NN_Indirect] := LD_A_NN_Indirect;
     1017  Instructions[in_DEC_SP] := DEC_SP;
     1018  Instructions[in_INC_A] := INC_A;
     1019  Instructions[in_DEC_A] := DEC_A;
     1020  Instructions[in_LD_A_N] := LD_A_N;
     1021  Instructions[in_CCF] := CCF;
     1022  Instructions[in_LD_B_B] := LD_B_B;
     1023  Instructions[in_LD_B_C] := LD_B_C;
     1024  Instructions[in_LD_B_D] := LD_B_D;
     1025  Instructions[in_LD_B_E] := LD_B_E;
     1026  Instructions[in_LD_B_H] := LD_B_H;
     1027  Instructions[in_LD_B_L] := LD_B_L;
     1028  Instructions[in_LD_B_HL_Indirect] := LD_B_HL_Indirect;
     1029  Instructions[in_LD_B_A] := LD_B_A;
     1030  Instructions[in_LD_C_B] := LD_C_B;
     1031  Instructions[in_LD_C_C] := LD_C_C;
     1032  Instructions[in_LD_C_D] := LD_C_D;
     1033  Instructions[in_LD_C_E] := LD_C_E;
     1034  Instructions[in_LD_C_H] := LD_C_H;
     1035  Instructions[in_LD_C_L] := LD_C_L;
     1036  Instructions[in_LD_C_HL_Indirect] := LD_C_HL_Indirect;
     1037  Instructions[in_LD_C_A] := LD_C_A;
     1038  Instructions[in_LD_D_B] := LD_D_B;
     1039  Instructions[in_LD_D_C] := LD_D_C;
     1040  Instructions[in_LD_D_D] := LD_D_D;
     1041  Instructions[in_LD_D_E] := LD_D_E;
     1042  Instructions[in_LD_D_H] := LD_D_H;
     1043  Instructions[in_LD_D_L] := LD_D_L;
     1044  Instructions[in_LD_D_HL_Indirect] := LD_D_HL_Indirect;
     1045  Instructions[in_LD_D_A] := LD_D_A;
     1046  Instructions[in_LD_E_B] := LD_E_B;
     1047  Instructions[in_LD_E_C] := LD_E_C;
     1048  Instructions[in_LD_E_D] := LD_E_D;
     1049  Instructions[in_LD_E_E] := LD_E_E;
     1050  Instructions[in_LD_E_H] := LD_E_H;
     1051  Instructions[in_LD_E_L] := LD_E_L;
     1052  Instructions[in_LD_E_HL_Indirect] := LD_E_HL_Indirect;
     1053  Instructions[in_LD_E_A] := LD_E_A;
     1054  Instructions[in_LD_H_B] := LD_H_B;
     1055  Instructions[in_LD_H_C] := LD_H_C;
     1056  Instructions[in_LD_H_D] := LD_H_D;
     1057  Instructions[in_LD_H_E] := LD_H_E;
     1058  Instructions[in_LD_H_H] := LD_H_H;
     1059  Instructions[in_LD_H_L] := LD_H_L;
     1060  Instructions[in_LD_H_HL_Indirect] := LD_H_HL_Indirect;
     1061  Instructions[in_LD_H_A] := LD_H_A;
     1062  Instructions[in_LD_L_B] := LD_L_B;
     1063  Instructions[in_LD_L_C] := LD_L_C;
     1064  Instructions[in_LD_L_D] := LD_L_D;
     1065  Instructions[in_LD_L_E] := LD_L_E;
     1066  Instructions[in_LD_L_H] := LD_L_H;
     1067  Instructions[in_LD_L_L] := LD_L_L;
     1068  Instructions[in_LD_L_HL_Indirect] := LD_L_HL_Indirect;
     1069  Instructions[in_LD_L_A] := LD_L_A;
     1070  Instructions[in_LD_HL_Indirect_B] := LD_HL_Indirect_B;
     1071  Instructions[in_LD_HL_Indirect_C] := LD_HL_Indirect_C;
    2841072  Instructions[in_LD_HL_Indirect_D] := LD_HL_Indirect_D;
    2851073  Instructions[in_LD_HL_Indirect_E] := LD_HL_Indirect_E;
    286   Instructions[in_LD_C_HL_Indirect] := LD_C_HL_Indirect;
     1074  Instructions[in_LD_HL_Indirect_H] := LD_HL_Indirect_H;
     1075  Instructions[in_LD_HL_Indirect_L] := LD_HL_Indirect_L;
     1076  Instructions[in_HALT] := HALT;
     1077  Instructions[in_LD_HL_Indirect_A] := LD_HL_Indirect_A;
     1078  Instructions[in_LD_A_B] := LD_A_B;
     1079  Instructions[in_LD_A_C] := LD_A_C;
     1080  Instructions[in_LD_A_D] := LD_A_D;
     1081  Instructions[in_LD_A_E] := LD_A_E;
     1082  Instructions[in_LD_A_H] := LD_A_H;
     1083  Instructions[in_LD_A_L] := LD_A_L;
    2871084  Instructions[in_LD_A_HL_Indirect] := LD_A_HL_Indirect;
    288   Instructions[in_LD_BC_Indirect_A] := LD_BC_Indirect_A;
    289 {
    290     :
    291     in_LD_HL_Indirect_nn: begin
    292       TempWord := ReadWord;
    293       DoWrite(HL.Value, TempWord and $ff);
    294       DoWrite(HL.Value + 1, TempWord shr 8);
    295     end;
    296     in_JP_ZN_nn: Jp(not Zero);
    297     in_CP_N: Cp(ReadByte);
    298     in_CP_D: Cp(DE.D);
    299     in_CP_E: Cp(DE.E);
    300     in_CALL_nn: begin
    301       TempWord := ReadWord;
    302       if DebugMode = dmStepOver then begin
    303         DebugStopAddress := PC;
    304         DebugMode := dmStopAddress;
    305       end;
    306       Call(TempWord);
    307     end;
    308     in_RET: Ret(True);
    309     in_RET_Z: Ret(Zero);
    310     in_RST_00: Call($00);
    311     in_RST_08: Call($08);
    312     in_RST_10: Call($10);
    313     in_RST_18: Call($18);
    314     in_RST_20: Call($20);
    315     in_RST_28: Call($28);
    316     in_RST_30: Call($30);
    317     in_RST_38: Call($38);
    318     in_DI: InterruptEnabled := False;
    319     in_EI: InterruptEnabled := True;
    320     in_IM1: InterruptMode := 1;
    321     in_OUT_N_A: DoOutput(ReadByte, A);
    322     in_XOR_A: A := A xor A;
    323     in_PUSH_BC: PushWord(BC.Value);
    324     in_PUSH_DE: PushWord(DE.Value);
    325     in_PUSH_HL: PushWord(HL.Value);
    326     in_SBC_HL_DE: HL.Value := HL.Value - DE.Value;
    327     in_EX_DE_HL: begin
    328       TempWord := DE.Value;
    329       DE.Value := HL.Value;
    330       HL.Value := TempWord;
    331     end;
    332     in_DEC_HL: Dec(HL.Value);
    333     in_INC_HL: Inc(HL.Value);
    334     in_INC_BC: Inc(BC.Value);
    335     in_INC_B: Inc(BC.B);
    336     in_DEC_B: Dec(BC.B);
    337     in_JR_NZ_d: Jr(not Zero);
    338     in_JR_NC_d: Jr(not Carry);
    339     in_DJNZ_d: Djnz;
    340     in_LD_H_B: HL.H := BC.B;
    341     in_LD_L_C: HL.L := BC.C;
    342     in_JR_d: Jr(True);
    343     in_LD_A_nn_Indirect: A := DoRead(ReadWord);
    344     in_OR_A: A := A or A;
    345     in_PUSH_AF: PushWord(A shl 8);
    346     in_LD_B_A: BC.B := A;
    347     in_AND_n: A := A and ReadByte;
    348     in_XOR_B: A := A xor BC.B;
    349     in_RLCA: begin
    350       Carry := (A and $80) <> 0;
    351       A := A shl 1;
    352     end;
    353     in_LD_C_A: BC.C := A;
    354     in_ADD_HL_BC: HL.Value := HL.Value + BC.Value;
    355 }
     1085  Instructions[in_LD_A_A] := LD_A_A;
     1086  Instructions[in_ADD_A_B] := ADD_A_B;
     1087  Instructions[in_ADD_A_C] := ADD_A_C;
     1088  Instructions[in_ADD_A_D] := ADD_A_D;
     1089  Instructions[in_ADD_A_E] := ADD_A_E;
     1090  Instructions[in_ADD_A_H] := ADD_A_H;
     1091  Instructions[in_ADD_A_L] := ADD_A_L;
     1092  Instructions[in_ADD_A_HL_Indirect] := ADD_A_HL_Indirect;
     1093  Instructions[in_ADD_A_A] := ADD_A_A;
     1094  Instructions[in_ADC_A_B] := ADC_A_B;
     1095  Instructions[in_ADC_A_C] := ADC_A_C;
     1096  Instructions[in_ADC_A_D] := ADC_A_D;
     1097  Instructions[in_ADC_A_E] := ADC_A_E;
     1098  Instructions[in_ADC_A_H] := ADC_A_H;
     1099  Instructions[in_ADC_A_L] := ADC_A_L;
     1100  Instructions[in_ADC_A_HL_Indirect] := ADC_A_HL_Indirect;
     1101  Instructions[in_ADC_A_A] := ADC_A_A;
     1102  Instructions[in_SUB_B] := SUB_B;
     1103  Instructions[in_SUB_C] := SUB_C;
     1104  Instructions[in_SUB_D] := SUB_D;
     1105  Instructions[in_SUB_E] := SUB_E;
     1106  Instructions[in_SUB_H] := SUB_H;
     1107  Instructions[in_SUB_L] := SUB_L;
     1108  Instructions[in_SUB_HL_Indirect] := SUB_HL_Indirect;
     1109  Instructions[in_SUB_A] := SUB_A;
     1110  Instructions[in_SBC_A_B] := SBC_A_B;
     1111  Instructions[in_SBC_A_C] := SBC_A_C;
     1112  Instructions[in_SBC_A_D] := SBC_A_D;
     1113  Instructions[in_SBC_A_E] := SBC_A_E;
     1114  Instructions[in_SBC_A_H] := SBC_A_H;
     1115  Instructions[in_SBC_A_L] := SBC_A_L;
     1116  Instructions[in_SBC_A_HL_Indirect] := SBC_A_HL_Indirect;
     1117  Instructions[in_SBC_A_A] := SBC_A_A;
     1118  Instructions[in_AND_B] := AND_B;
     1119  Instructions[in_AND_C] := AND_C;
     1120  Instructions[in_AND_D] := AND_D;
     1121  Instructions[in_AND_E] := AND_E;
     1122  Instructions[in_AND_H] := AND_H;
     1123  Instructions[in_AND_L] := AND_L;
     1124  Instructions[in_AND_HL_Indirect] := AND_HL_Indirect;
     1125  Instructions[in_AND_A] := AND_A;
     1126  Instructions[in_XOR_B] := XOR_B;
     1127  Instructions[in_XOR_C] := XOR_C;
     1128  Instructions[in_XOR_D] := XOR_D;
     1129  Instructions[in_XOR_E] := XOR_E;
     1130  Instructions[in_XOR_H] := XOR_H;
     1131  Instructions[in_XOR_L] := XOR_L;
     1132  Instructions[in_XOR_HL_Indirect] := XOR_HL_Indirect;
     1133  Instructions[in_XOR_A] := XOR_A;
     1134  Instructions[in_OR_B] := OR_B;
     1135  Instructions[in_OR_C] := OR_C;
     1136  Instructions[in_OR_D] := OR_D;
     1137  Instructions[in_OR_E] := OR_E;
     1138  Instructions[in_OR_H] := OR_H;
     1139  Instructions[in_OR_L] := OR_L;
     1140  Instructions[in_OR_HL_Indirect] := OR_HL_Indirect;
     1141  Instructions[in_OR_A] := OR_A;
     1142  Instructions[in_CP_B] := CP_B;
     1143  Instructions[in_CP_C] := CP_C;
     1144  Instructions[in_CP_D] := CP_D;
     1145  Instructions[in_CP_E] := CP_E;
     1146  Instructions[in_CP_H] := CP_H;
     1147  Instructions[in_CP_L] := CP_L;
     1148  Instructions[in_CP_HL_Indirect] := CP_HL_Indirect;
     1149  Instructions[in_CP_A] := CP_A;
     1150  Instructions[in_RET_NZ] := RET_NZ;
     1151  Instructions[in_POP_BC] := POP_BC;
     1152  Instructions[in_JP_NZ_NN] := JP_NZ_NN;
     1153  Instructions[in_JP_NN] := JP_NN;
     1154  Instructions[in_CALL_NZ_NN] := CALL_NZ_NN;
     1155  Instructions[in_PUSH_BC] := PUSH_BC;
     1156  Instructions[in_ADD_A_N] := ADD_A_N;
     1157  Instructions[in_RST_00H] := RST_00H;
     1158  Instructions[in_RET_Z] := RET_Z;
     1159  Instructions[in_RET] := RET;
     1160  Instructions[in_JP_Z_NN] := JP_Z_NN;
     1161  Instructions[in_CALL_Z_NN] := CALL_Z_NN;
     1162  Instructions[in_CALL_NN] := CALL_NN;
     1163  Instructions[in_ADC_A_N] := ADC_A_N;
     1164  Instructions[in_RST_08H] := RST_08H;
     1165  Instructions[in_RET_NC] := RET_NC;
     1166  Instructions[in_POP_DE] := POP_DE;
     1167  Instructions[in_JP_NC_NN] := JP_NC_NN;
     1168  Instructions[in_OUT_N_Indirect_A] := OUT_N_Indirect_A;
     1169  Instructions[in_CALL_NC_NN] := CALL_NC_NN;
     1170  Instructions[in_PUSH_DE] := PUSH_DE;
     1171  Instructions[in_SUB_N] := SUB_N;
     1172  Instructions[in_RST_10H] := RST_10H;
     1173  Instructions[in_RET_C] := RET_C;
     1174  Instructions[in_EXX] := EXX;
     1175  Instructions[in_JP_C_NN] := JP_C_NN;
     1176  Instructions[in_IN_A_N_Indirect] := IN_A_N_Indirect;
     1177  Instructions[in_CALL_C_NN] := CALL_C_NN;
     1178  Instructions[in_SBC_A_N] := SBC_A_N;
     1179  Instructions[in_RST_18H] := RST_18H;
     1180  Instructions[in_RET_PO] := RET_PO;
     1181  Instructions[in_POP_HL] := POP_HL;
     1182  Instructions[in_JP_PO_NN] := JP_PO_NN;
     1183  Instructions[in_EX_SP_Indirect_HL] := EX_SP_Indirect_HL;
     1184  Instructions[in_CALL_PO_NN] := CALL_PO_NN;
     1185  Instructions[in_PUSH_HL] := PUSH_HL;
     1186  Instructions[in_AND_N] := AND_N;
     1187  Instructions[in_RST_20H] := RST_20H;
     1188  Instructions[in_RET_PE] := RET_PE;
     1189  Instructions[in_JP_HL_Indirect] := JP_HL_Indirect;
     1190  Instructions[in_JP_PE_NN] := JP_PE_NN;
     1191  Instructions[in_EX_DE_HL] := EX_DE_HL;
     1192  Instructions[in_CALL_PE_NN] := CALL_PE_NN;
     1193  Instructions[in_XOR_N] := XOR_N;
     1194  Instructions[in_RST_28H] := RST_28H;
     1195  Instructions[in_RET_P] := RET_P;
     1196  Instructions[in_POP_AF] := POP_AF;
     1197  Instructions[in_JP_P_NN] := JP_P_NN;
     1198  Instructions[in_DI] := DI;
     1199  Instructions[in_CALL_P_NN] := CALL_P_NN;
     1200  Instructions[in_PUSH_AF] := PUSH_AF;
     1201  Instructions[in_OR_N] := OR_N;
     1202  Instructions[in_RST_30H] := RST_30H;
     1203  Instructions[in_RET_M] := RET_M;
     1204  Instructions[in_LD_SP_HL] := LD_SP_HL;
     1205  Instructions[in_JP_M_NN] := JP_M_NN;
     1206  Instructions[in_EI] := EI;
     1207  Instructions[in_CALL_M_NN] := CALL_M_NN;
     1208  Instructions[in_CP_N] := CP_N;
     1209  Instructions[in_RST_38H] := RST_38H;
     1210  Instructions[in_IN_B_C_Indirect] := IN_B_C_Indirect;
     1211  Instructions[in_OUT_C_Indirect_B] := OUT_C_Indirect_B;
     1212  Instructions[in_SBC_HL_BC] := SBC_HL_BC;
     1213  Instructions[in_LD_NN_Indirect_BC] := LD_NN_Indirect_BC;
     1214  Instructions[in_NEG] := NEG;
     1215  Instructions[in_RETN] := RETN;
     1216  Instructions[in_IM_0] := IM_0;
     1217  Instructions[in_LD_I_A] := LD_I_A;
     1218  Instructions[in_IN_C_C_Indirect] := IN_C_C_Indirect;
     1219  Instructions[in_OUT_C_Indirect_C] := OUT_C_Indirect_C;
     1220  Instructions[in_ADC_HL_BC] := ADC_HL_BC;
     1221  Instructions[in_LD_BC_NN_Indirect] := LD_BC_NN_Indirect;
     1222  Instructions[in_RETI] := RETI;
     1223  Instructions[in_LD_R_A] := LD_R_A;
     1224  Instructions[in_IN_D_C_Indirect] := IN_D_C_Indirect;
     1225  Instructions[in_OUT_C_Indirect_D] := OUT_C_Indirect_D;
     1226  Instructions[in_SBC_HL_DE] := SBC_HL_DE;
     1227  Instructions[in_LD_NN_Indirect_DE] := LD_NN_Indirect_DE;
     1228  Instructions[in_IM_1] := IM_1;
     1229  Instructions[in_LD_A_I] := LD_A_I;
     1230  Instructions[in_IN_E_C_Indirect] := IN_E_C_Indirect;
     1231  Instructions[in_OUT_C_Indirect_E] := OUT_C_Indirect_E;
     1232  Instructions[in_ADC_HL_DE] := ADC_HL_DE;
     1233  Instructions[in_LD_DE_NN_Indirect] := LD_DE_NN_Indirect;
     1234  Instructions[in_IM_2] := IM_2;
     1235  Instructions[in_LD_A_R] := LD_A_R;
     1236  Instructions[in_IN_H_C_Indirect] := IN_H_C_Indirect;
     1237  Instructions[in_OUT_C_Indirect_H] := OUT_C_Indirect_H;
     1238  Instructions[in_SBC_HL_HL] := SBC_HL_HL;
     1239  Instructions[in_RRD] := RRD;
     1240  Instructions[in_IN_L_C_Indirect] := IN_L_C_Indirect;
     1241  Instructions[in_OUT_C_Indirect_L] := OUT_C_Indirect_L;
     1242  Instructions[in_ADC_HL_HL] := ADC_HL_HL;
     1243  Instructions[in_RLD] := RLD;
     1244  Instructions[in_SBC_HL_SP] := SBC_HL_SP;
     1245  Instructions[in_LD_NN_Indirect_SP] := LD_NN_Indirect_SP;
     1246  Instructions[in_IN_A_C_Indirect] := IN_A_C_Indirect;
     1247  Instructions[in_OUT_C_Indirect_A] := OUT_C_Indirect_A;
     1248  Instructions[in_ADC_HL_SP] := ADC_HL_SP;
     1249  Instructions[in_LD_SP_NN_Indirect] := LD_SP_NN_Indirect;
     1250  Instructions[in_LDI] := LDI;
     1251  Instructions[in_CPI] := CPI;
     1252  Instructions[in_INI] := INI;
     1253  Instructions[in_OUTI] := OUTI;
     1254  Instructions[in_LDD] := LDD;
     1255  Instructions[in_CPD] := CPD;
     1256  Instructions[in_IND] := IND;
     1257  Instructions[in_OUTD] := OUTD;
     1258  Instructions[in_LDIR] := LDIR;
     1259  Instructions[in_CPIR] := CPIR;
     1260  Instructions[in_INIR] := INIR;
     1261  Instructions[in_OTIR] := OTIR;
     1262  Instructions[in_LDDR] := LDDR;
     1263  Instructions[in_CPDR] := CPDR;
     1264  Instructions[in_INDR] := INDR;
     1265  Instructions[in_OTDR] := OTDR;
     1266  Instructions[in_RLC_B] := RLC_B;
     1267  Instructions[in_RLC_C] := RLC_C;
     1268  Instructions[in_RLC_D] := RLC_D;
     1269  Instructions[in_RLC_E] := RLC_E;
     1270  Instructions[in_RLC_H] := RLC_H;
     1271  Instructions[in_RLC_L] := RLC_L;
     1272  Instructions[in_RLC_HL_Indirect] := RLC_HL_Indirect;
     1273  Instructions[in_RLC_A] := RLC_A;
     1274  Instructions[in_RRC_B] := RRC_B;
     1275  Instructions[in_RRC_C] := RRC_C;
     1276  Instructions[in_RRC_D] := RRC_D;
     1277  Instructions[in_RRC_E] := RRC_E;
     1278  Instructions[in_RRC_H] := RRC_H;
     1279  Instructions[in_RRC_L] := RRC_L;
     1280  Instructions[in_RRC_HL_Indirect] := RRC_HL_Indirect;
     1281  Instructions[in_RRC_A] := RRC_A;
     1282  Instructions[in_RL_B] := RL_B;
     1283  Instructions[in_RL_C] := RL_C;
     1284  Instructions[in_RL_D] := RL_D;
     1285  Instructions[in_RL_E] := RL_E;
     1286  Instructions[in_RL_H] := RL_H;
     1287  Instructions[in_RL_L] := RL_L;
     1288  Instructions[in_RL_HL_Indirect] := RL_HL_Indirect;
     1289  Instructions[in_RL_A] := RL_A;
     1290  Instructions[in_RR_B] := RR_B;
     1291  Instructions[in_RR_C] := RR_C;
     1292  Instructions[in_RR_D] := RR_D;
     1293  Instructions[in_RR_E] := RR_E;
     1294  Instructions[in_RR_H] := RR_H;
     1295  Instructions[in_RR_L] := RR_L;
     1296  Instructions[in_RR_HL_Indirect] := RR_HL_Indirect;
     1297  Instructions[in_RR_A] := RR_A;
     1298  Instructions[in_SLA_B] := SLA_B;
     1299  Instructions[in_SLA_C] := SLA_C;
     1300  Instructions[in_SLA_D] := SLA_D;
     1301  Instructions[in_SLA_E] := SLA_E;
     1302  Instructions[in_SLA_H] := SLA_H;
     1303  Instructions[in_SLA_L] := SLA_L;
     1304  Instructions[in_SLA_HL_Indirect] := SLA_HL_Indirect;
     1305  Instructions[in_SLA_A] := SLA_A;
     1306  Instructions[in_SRA_B] := SRA_B;
     1307  Instructions[in_SRA_C] := SRA_C;
     1308  Instructions[in_SRA_D] := SRA_D;
     1309  Instructions[in_SRA_E] := SRA_E;
     1310  Instructions[in_SRA_H] := SRA_H;
     1311  Instructions[in_SRA_L] := SRA_L;
     1312  Instructions[in_SRA_HL_Indirect] := SRA_HL_Indirect;
     1313  Instructions[in_SRA_A] := SRA_A;
     1314  Instructions[in_SRL_B] := SRL_B;
     1315  Instructions[in_SRL_C] := SRL_C;
     1316  Instructions[in_SRL_D] := SRL_D;
     1317  Instructions[in_SRL_E] := SRL_E;
     1318  Instructions[in_SRL_H] := SRL_H;
     1319  Instructions[in_SRL_L] := SRL_L;
     1320  Instructions[in_SRL_HL_Indirect] := SRL_HL_Indirect;
     1321  Instructions[in_SRL_A] := SRL_A;
     1322  Instructions[in_BIT_0_B] := BIT_0_B;
     1323  Instructions[in_BIT_0_C] := BIT_0_C;
     1324  Instructions[in_BIT_0_D] := BIT_0_D;
     1325  Instructions[in_BIT_0_E] := BIT_0_E;
     1326  Instructions[in_BIT_0_H] := BIT_0_H;
     1327  Instructions[in_BIT_0_L] := BIT_0_L;
     1328  Instructions[in_BIT_0_HL_Indirect] := BIT_0_HL_Indirect;
     1329  Instructions[in_BIT_0_A] := BIT_0_A;
     1330  Instructions[in_BIT_1_B] := BIT_1_B;
     1331  Instructions[in_BIT_1_C] := BIT_1_C;
     1332  Instructions[in_BIT_1_D] := BIT_1_D;
     1333  Instructions[in_BIT_1_E] := BIT_1_E;
     1334  Instructions[in_BIT_1_H] := BIT_1_H;
     1335  Instructions[in_BIT_1_L] := BIT_1_L;
     1336  Instructions[in_BIT_1_HL_Indirect] := BIT_1_HL_Indirect;
     1337  Instructions[in_BIT_1_A] := BIT_1_A;
     1338  Instructions[in_BIT_2_B] := BIT_2_B;
     1339  Instructions[in_BIT_2_C] := BIT_2_C;
     1340  Instructions[in_BIT_2_D] := BIT_2_D;
     1341  Instructions[in_BIT_2_E] := BIT_2_E;
     1342  Instructions[in_BIT_2_H] := BIT_2_H;
     1343  Instructions[in_BIT_2_L] := BIT_2_L;
     1344  Instructions[in_BIT_2_HL_Indirect] := BIT_2_HL_Indirect;
     1345  Instructions[in_BIT_2_A] := BIT_2_A;
     1346  Instructions[in_BIT_3_B] := BIT_3_B;
     1347  Instructions[in_BIT_3_C] := BIT_3_C;
     1348  Instructions[in_BIT_3_D] := BIT_3_D;
     1349  Instructions[in_BIT_3_E] := BIT_3_E;
     1350  Instructions[in_BIT_3_H] := BIT_3_H;
     1351  Instructions[in_BIT_3_L] := BIT_3_L;
     1352  Instructions[in_BIT_3_HL_Indirect] := BIT_3_HL_Indirect;
     1353  Instructions[in_BIT_3_A] := BIT_3_A;
     1354  Instructions[in_BIT_4_B] := BIT_4_B;
     1355  Instructions[in_BIT_4_C] := BIT_4_C;
     1356  Instructions[in_BIT_4_D] := BIT_4_D;
     1357  Instructions[in_BIT_4_E] := BIT_4_E;
     1358  Instructions[in_BIT_4_H] := BIT_4_H;
     1359  Instructions[in_BIT_4_L] := BIT_4_L;
     1360  Instructions[in_BIT_4_HL_Indirect] := BIT_4_HL_Indirect;
     1361  Instructions[in_BIT_4_A] := BIT_4_A;
     1362  Instructions[in_BIT_5_B] := BIT_5_B;
     1363  Instructions[in_BIT_5_C] := BIT_5_C;
     1364  Instructions[in_BIT_5_D] := BIT_5_D;
     1365  Instructions[in_BIT_5_E] := BIT_5_E;
     1366  Instructions[in_BIT_5_H] := BIT_5_H;
     1367  Instructions[in_BIT_5_L] := BIT_5_L;
     1368  Instructions[in_BIT_5_HL_Indirect] := BIT_5_HL_Indirect;
     1369  Instructions[in_BIT_5_A] := BIT_5_A;
     1370  Instructions[in_BIT_6_B] := BIT_6_B;
     1371  Instructions[in_BIT_6_C] := BIT_6_C;
     1372  Instructions[in_BIT_6_D] := BIT_6_D;
     1373  Instructions[in_BIT_6_E] := BIT_6_E;
     1374  Instructions[in_BIT_6_H] := BIT_6_H;
     1375  Instructions[in_BIT_6_L] := BIT_6_L;
     1376  Instructions[in_BIT_6_HL_Indirect] := BIT_6_HL_Indirect;
     1377  Instructions[in_BIT_6_A] := BIT_6_A;
     1378  Instructions[in_BIT_7_B] := BIT_7_B;
     1379  Instructions[in_BIT_7_C] := BIT_7_C;
     1380  Instructions[in_BIT_7_D] := BIT_7_D;
     1381  Instructions[in_BIT_7_E] := BIT_7_E;
     1382  Instructions[in_BIT_7_H] := BIT_7_H;
     1383  Instructions[in_BIT_7_L] := BIT_7_L;
     1384  Instructions[in_BIT_7_HL_Indirect] := BIT_7_HL_Indirect;
     1385  Instructions[in_BIT_7_A] := BIT_7_A;
     1386  Instructions[in_RES_0_B] := RES_0_B;
     1387  Instructions[in_RES_0_C] := RES_0_C;
     1388  Instructions[in_RES_0_D] := RES_0_D;
     1389  Instructions[in_RES_0_E] := RES_0_E;
     1390  Instructions[in_RES_0_H] := RES_0_H;
     1391  Instructions[in_RES_0_L] := RES_0_L;
     1392  Instructions[in_RES_0_HL_Indirect] := RES_0_HL_Indirect;
     1393  Instructions[in_RES_0_A] := RES_0_A;
     1394  Instructions[in_RES_1_B] := RES_1_B;
     1395  Instructions[in_RES_1_C] := RES_1_C;
     1396  Instructions[in_RES_1_D] := RES_1_D;
     1397  Instructions[in_RES_1_E] := RES_1_E;
     1398  Instructions[in_RES_1_H] := RES_1_H;
     1399  Instructions[in_RES_1_L] := RES_1_L;
     1400  Instructions[in_RES_1_HL_Indirect] := RES_1_HL_Indirect;
     1401  Instructions[in_RES_1_A] := RES_1_A;
     1402  Instructions[in_RES_2_B] := RES_2_B;
     1403  Instructions[in_RES_2_C] := RES_2_C;
     1404  Instructions[in_RES_2_D] := RES_2_D;
     1405  Instructions[in_RES_2_E] := RES_2_E;
     1406  Instructions[in_RES_2_H] := RES_2_H;
     1407  Instructions[in_RES_2_L] := RES_2_L;
     1408  Instructions[in_RES_2_HL_Indirect] := RES_2_HL_Indirect;
     1409  Instructions[in_RES_2_A] := RES_2_A;
     1410  Instructions[in_RES_3_B] := RES_3_B;
     1411  Instructions[in_RES_3_C] := RES_3_C;
     1412  Instructions[in_RES_3_D] := RES_3_D;
     1413  Instructions[in_RES_3_E] := RES_3_E;
     1414  Instructions[in_RES_3_H] := RES_3_H;
     1415  Instructions[in_RES_3_L] := RES_3_L;
     1416  Instructions[in_RES_3_HL_Indirect] := RES_3_HL_Indirect;
     1417  Instructions[in_RES_3_A] := RES_3_A;
     1418  Instructions[in_RES_4_B] := RES_4_B;
     1419  Instructions[in_RES_4_C] := RES_4_C;
     1420  Instructions[in_RES_4_D] := RES_4_D;
     1421  Instructions[in_RES_4_E] := RES_4_E;
     1422  Instructions[in_RES_4_H] := RES_4_H;
     1423  Instructions[in_RES_4_L] := RES_4_L;
     1424  Instructions[in_RES_4_HL_Indirect] := RES_4_HL_Indirect;
     1425  Instructions[in_RES_4_A] := RES_4_A;
     1426  Instructions[in_RES_5_B] := RES_5_B;
     1427  Instructions[in_RES_5_C] := RES_5_C;
     1428  Instructions[in_RES_5_D] := RES_5_D;
     1429  Instructions[in_RES_5_E] := RES_5_E;
     1430  Instructions[in_RES_5_H] := RES_5_H;
     1431  Instructions[in_RES_5_L] := RES_5_L;
     1432  Instructions[in_RES_5_HL_Indirect] := RES_5_HL_Indirect;
     1433  Instructions[in_RES_5_A] := RES_5_A;
     1434  Instructions[in_RES_6_B] := RES_6_B;
     1435  Instructions[in_RES_6_C] := RES_6_C;
     1436  Instructions[in_RES_6_D] := RES_6_D;
     1437  Instructions[in_RES_6_E] := RES_6_E;
     1438  Instructions[in_RES_6_H] := RES_6_H;
     1439  Instructions[in_RES_6_L] := RES_6_L;
     1440  Instructions[in_RES_6_HL_Indirect] := RES_6_HL_Indirect;
     1441  Instructions[in_RES_6_A] := RES_6_A;
     1442  Instructions[in_RES_7_B] := RES_7_B;
     1443  Instructions[in_RES_7_C] := RES_7_C;
     1444  Instructions[in_RES_7_D] := RES_7_D;
     1445  Instructions[in_RES_7_E] := RES_7_E;
     1446  Instructions[in_RES_7_H] := RES_7_H;
     1447  Instructions[in_RES_7_L] := RES_7_L;
     1448  Instructions[in_RES_7_HL_Indirect] := RES_7_HL_Indirect;
     1449  Instructions[in_RES_7_A] := RES_7_A;
     1450  Instructions[in_SET_0_B] := SET_0_B;
     1451  Instructions[in_SET_0_C] := SET_0_C;
     1452  Instructions[in_SET_0_D] := SET_0_D;
     1453  Instructions[in_SET_0_E] := SET_0_E;
     1454  Instructions[in_SET_0_H] := SET_0_H;
     1455  Instructions[in_SET_0_L] := SET_0_L;
     1456  Instructions[in_SET_0_HL_Indirect] := SET_0_HL_Indirect;
     1457  Instructions[in_SET_0_A] := SET_0_A;
     1458  Instructions[in_SET_1_B] := SET_1_B;
     1459  Instructions[in_SET_1_C] := SET_1_C;
     1460  Instructions[in_SET_1_D] := SET_1_D;
     1461  Instructions[in_SET_1_E] := SET_1_E;
     1462  Instructions[in_SET_1_H] := SET_1_H;
     1463  Instructions[in_SET_1_L] := SET_1_L;
     1464  Instructions[in_SET_1_HL_Indirect] := SET_1_HL_Indirect;
     1465  Instructions[in_SET_1_A] := SET_1_A;
     1466  Instructions[in_SET_2_B] := SET_2_B;
     1467  Instructions[in_SET_2_C] := SET_2_C;
     1468  Instructions[in_SET_2_D] := SET_2_D;
     1469  Instructions[in_SET_2_E] := SET_2_E;
     1470  Instructions[in_SET_2_H] := SET_2_H;
     1471  Instructions[in_SET_2_L] := SET_2_L;
     1472  Instructions[in_SET_2_HL_Indirect] := SET_2_HL_Indirect;
     1473  Instructions[in_SET_2_A] := SET_2_A;
     1474  Instructions[in_SET_3_B] := SET_3_B;
     1475  Instructions[in_SET_3_C] := SET_3_C;
     1476  Instructions[in_SET_3_D] := SET_3_D;
     1477  Instructions[in_SET_3_E] := SET_3_E;
     1478  Instructions[in_SET_3_H] := SET_3_H;
     1479  Instructions[in_SET_3_L] := SET_3_L;
     1480  Instructions[in_SET_3_HL_Indirect] := SET_3_HL_Indirect;
     1481  Instructions[in_SET_3_A] := SET_3_A;
     1482  Instructions[in_SET_4_B] := SET_4_B;
     1483  Instructions[in_SET_4_C] := SET_4_C;
     1484  Instructions[in_SET_4_D] := SET_4_D;
     1485  Instructions[in_SET_4_E] := SET_4_E;
     1486  Instructions[in_SET_4_H] := SET_4_H;
     1487  Instructions[in_SET_4_L] := SET_4_L;
     1488  Instructions[in_SET_4_HL_Indirect] := SET_4_HL_Indirect;
     1489  Instructions[in_SET_4_A] := SET_4_A;
     1490  Instructions[in_SET_5_B] := SET_5_B;
     1491  Instructions[in_SET_5_C] := SET_5_C;
     1492  Instructions[in_SET_5_D] := SET_5_D;
     1493  Instructions[in_SET_5_E] := SET_5_E;
     1494  Instructions[in_SET_5_H] := SET_5_H;
     1495  Instructions[in_SET_5_L] := SET_5_L;
     1496  Instructions[in_SET_5_HL_Indirect] := SET_5_HL_Indirect;
     1497  Instructions[in_SET_5_A] := SET_5_A;
     1498  Instructions[in_SET_6_B] := SET_6_B;
     1499  Instructions[in_SET_6_C] := SET_6_C;
     1500  Instructions[in_SET_6_D] := SET_6_D;
     1501  Instructions[in_SET_6_E] := SET_6_E;
     1502  Instructions[in_SET_6_H] := SET_6_H;
     1503  Instructions[in_SET_6_L] := SET_6_L;
     1504  Instructions[in_SET_6_HL_Indirect] := SET_6_HL_Indirect;
     1505  Instructions[in_SET_6_A] := SET_6_A;
     1506  Instructions[in_SET_7_B] := SET_7_B;
     1507  Instructions[in_SET_7_C] := SET_7_C;
     1508  Instructions[in_SET_7_D] := SET_7_D;
     1509  Instructions[in_SET_7_E] := SET_7_E;
     1510  Instructions[in_SET_7_H] := SET_7_H;
     1511  Instructions[in_SET_7_L] := SET_7_L;
     1512  Instructions[in_SET_7_HL_Indirect] := SET_7_HL_Indirect;
     1513  Instructions[in_SET_7_A] := SET_7_A;
     1514  Instructions[in_ADD_IX_BC] := ADD_IX_BC;
     1515  Instructions[in_ADD_IX_DE] := ADD_IX_DE;
     1516  Instructions[in_LD_IX_NN] := LD_IX_NN;
     1517  Instructions[in_LD_NN_Indirect_IX] := LD_NN_Indirect_IX;
     1518  Instructions[in_INC_IX] := INC_IX;
     1519  Instructions[in_ADD_IX_IX] := ADD_IX_IX;
     1520  Instructions[in_LD_IX_NN_Indirect] := LD_IX_NN_Indirect;
     1521  Instructions[in_DEC_IX] := DEC_IX;
     1522  Instructions[in_INC_IX_Plus_D_Indirect] := INC_IX_Plus_D_Indirect;
     1523  Instructions[in_DEC_IX_Plus_D_Indirect] := DEC_IX_Plus_D_Indirect;
     1524  Instructions[in_LD_IX_Plus_D_Indirect_N] := LD_IX_Plus_D_Indirect_N;
     1525  Instructions[in_ADD_IX_SP] := ADD_IX_SP;
     1526  Instructions[in_LD_B_IX_Plus_D_Indirect] := LD_B_IX_Plus_D_Indirect;
     1527  Instructions[in_LD_C_IX_Plus_D_Indirect] := LD_C_IX_Plus_D_Indirect;
     1528  Instructions[in_LD_D_IX_Plus_D_Indirect] := LD_D_IX_Plus_D_Indirect;
     1529  Instructions[in_LD_E_IX_Plus_D_Indirect] := LD_E_IX_Plus_D_Indirect;
     1530  Instructions[in_LD_H_IX_Plus_D_Indirect] := LD_H_IX_Plus_D_Indirect;
     1531  Instructions[in_LD_L_IX_Plus_D_Indirect] := LD_L_IX_Plus_D_Indirect;
     1532  Instructions[in_LD_IX_Plus_D_Indirect_B] := LD_IX_Plus_D_Indirect_B;
     1533  Instructions[in_LD_IX_Plus_D_Indirect_C] := LD_IX_Plus_D_Indirect_C;
     1534  Instructions[in_LD_IX_Plus_D_Indirect_D] := LD_IX_Plus_D_Indirect_D;
     1535  Instructions[in_LD_IX_Plus_D_Indirect_E] := LD_IX_Plus_D_Indirect_E;
     1536  Instructions[in_LD_IX_Plus_D_Indirect_H] := LD_IX_Plus_D_Indirect_H;
     1537  Instructions[in_LD_IX_Plus_D_Indirect_L] := LD_IX_Plus_D_Indirect_L;
     1538  Instructions[in_LD_IX_Plus_D_Indirect_A] := LD_IX_Plus_D_Indirect_A;
     1539  Instructions[in_LD_A_IX_Plus_D_Indirect] := LD_A_IX_Plus_D_Indirect;
     1540  Instructions[in_ADD_A_IX_Plus_D_Indirect] := ADD_A_IX_Plus_D_Indirect;
     1541  Instructions[in_ADC_A_IX_Plus_D_Indirect] := ADC_A_IX_Plus_D_Indirect;
     1542  Instructions[in_SUB_IX_Plus_D_Indirect] := SUB_IX_Plus_D_Indirect;
     1543  Instructions[in_SBC_A_IX_Plus_D_Indirect] := SBC_A_IX_Plus_D_Indirect;
     1544  Instructions[in_AND_IX_Plus_D_Indirect] := AND_IX_Plus_D_Indirect;
     1545  Instructions[in_XOR_IX_Plus_D_Indirect] := XOR_IX_Plus_D_Indirect;
     1546  Instructions[in_OR_IX_Plus_D_Indirect] := OR_IX_Plus_D_Indirect;
     1547  Instructions[in_CP_IX_Plus_D_Indirect] := CP_IX_Plus_D_Indirect;
     1548  Instructions[in_POP_IX] := POP_IX;
     1549  Instructions[in_EX_SP_Indirect_IX] := EX_SP_Indirect_IX;
     1550  Instructions[in_PUSH_IX] := PUSH_IX;
     1551  Instructions[in_JP_IX_Indirect] := JP_IX_Indirect;
     1552  Instructions[in_LD_SP_IX] := LD_SP_IX;
     1553  Instructions[in_RLC_IX_Plus_D_Indirect] := RLC_IX_Plus_D_Indirect;
     1554  Instructions[in_RRC_IX_Plus_D_Indirect] := RRC_IX_Plus_D_Indirect;
     1555  Instructions[in_RL_IX_Plus_D_Indirect] := RL_IX_Plus_D_Indirect;
     1556  Instructions[in_RR_IX_Plus_D_Indirect] := RR_IX_Plus_D_Indirect;
     1557  Instructions[in_SLA_IX_Plus_D_Indirect] := SLA_IX_Plus_D_Indirect;
     1558  Instructions[in_SRA_IX_Plus_D_Indirect] := SRA_IX_Plus_D_Indirect;
     1559  Instructions[in_SRL_IX_Plus_D_Indirect] := SRL_IX_Plus_D_Indirect;
     1560  Instructions[in_BIT_0_IX_Plus_D_Indirect] := BIT_0_IX_Plus_D_Indirect;
     1561  Instructions[in_BIT_1_IX_Plus_D_Indirect] := BIT_1_IX_Plus_D_Indirect;
     1562  Instructions[in_BIT_2_IX_Plus_D_Indirect] := BIT_2_IX_Plus_D_Indirect;
     1563  Instructions[in_BIT_3_IX_Plus_D_Indirect] := BIT_3_IX_Plus_D_Indirect;
     1564  Instructions[in_BIT_4_IX_Plus_D_Indirect] := BIT_4_IX_Plus_D_Indirect;
     1565  Instructions[in_BIT_5_IX_Plus_D_Indirect] := BIT_5_IX_Plus_D_Indirect;
     1566  Instructions[in_BIT_6_IX_Plus_D_Indirect] := BIT_6_IX_Plus_D_Indirect;
     1567  Instructions[in_BIT_7_IX_Plus_D_Indirect] := BIT_7_IX_Plus_D_Indirect;
     1568  Instructions[in_RES_0_IX_Plus_D_Indirect] := RES_0_IX_Plus_D_Indirect;
     1569  Instructions[in_RES_1_IX_Plus_D_Indirect] := RES_1_IX_Plus_D_Indirect;
     1570  Instructions[in_RES_2_IX_Plus_D_Indirect] := RES_2_IX_Plus_D_Indirect;
     1571  Instructions[in_RES_3_IX_Plus_D_Indirect] := RES_3_IX_Plus_D_Indirect;
     1572  Instructions[in_RES_4_IX_Plus_D_Indirect] := RES_4_IX_Plus_D_Indirect;
     1573  Instructions[in_RES_5_IX_Plus_D_Indirect] := RES_5_IX_Plus_D_Indirect;
     1574  Instructions[in_RES_6_IX_Plus_D_Indirect] := RES_6_IX_Plus_D_Indirect;
     1575  Instructions[in_RES_7_IX_Plus_D_Indirect] := RES_7_IX_Plus_D_Indirect;
     1576  Instructions[in_SET_0_IX_Plus_D_Indirect] := SET_0_IX_Plus_D_Indirect;
     1577  Instructions[in_SET_1_IX_Plus_D_Indirect] := SET_1_IX_Plus_D_Indirect;
     1578  Instructions[in_SET_2_IX_Plus_D_Indirect] := SET_2_IX_Plus_D_Indirect;
     1579  Instructions[in_SET_3_IX_Plus_D_Indirect] := SET_3_IX_Plus_D_Indirect;
     1580  Instructions[in_SET_4_IX_Plus_D_Indirect] := SET_4_IX_Plus_D_Indirect;
     1581  Instructions[in_SET_5_IX_Plus_D_Indirect] := SET_5_IX_Plus_D_Indirect;
     1582  Instructions[in_SET_6_IX_Plus_D_Indirect] := SET_6_IX_Plus_D_Indirect;
     1583  Instructions[in_SET_7_IX_Plus_D_Indirect] := SET_7_IX_Plus_D_Indirect;
     1584  Instructions[in_ADD_IY_BC] := ADD_IY_BC;
     1585  Instructions[in_ADD_IY_DE] := ADD_IY_DE;
     1586  Instructions[in_LD_IY_NN] := LD_IY_NN;
     1587  Instructions[in_LD_NN_Indirect_IY] := LD_NN_Indirect_IY;
     1588  Instructions[in_INC_IY] := INC_IY;
     1589  Instructions[in_ADD_IY_IY] := ADD_IY_IY;
     1590  Instructions[in_LD_IY_NN_Indirect] := LD_IY_NN_Indirect;
     1591  Instructions[in_DEC_IY] := DEC_IY;
     1592  Instructions[in_INC_IY_Plus_D_Indirect] := INC_IY_Plus_D_Indirect;
     1593  Instructions[in_DEC_IY_Plus_D_Indirect] := DEC_IY_Plus_D_Indirect;
     1594  Instructions[in_LD_IY_Plus_D_Indirect_N] := LD_IY_Plus_D_Indirect_N;
     1595  Instructions[in_ADD_IY_SP] := ADD_IY_SP;
     1596  Instructions[in_LD_B_IY_Plus_D_Indirect] := LD_B_IY_Plus_D_Indirect;
     1597  Instructions[in_LD_C_IY_Plus_D_Indirect] := LD_C_IY_Plus_D_Indirect;
     1598  Instructions[in_LD_D_IY_Plus_D_Indirect] := LD_D_IY_Plus_D_Indirect;
     1599  Instructions[in_LD_E_IY_Plus_D_Indirect] := LD_E_IY_Plus_D_Indirect;
     1600  Instructions[in_LD_H_IY_Plus_D_Indirect] := LD_H_IY_Plus_D_Indirect;
     1601  Instructions[in_LD_L_IY_Plus_D_Indirect] := LD_L_IY_Plus_D_Indirect;
     1602  Instructions[in_LD_IY_Plus_D_Indirect_B] := LD_IY_Plus_D_Indirect_B;
     1603  Instructions[in_LD_IY_Plus_D_Indirect_C] := LD_IY_Plus_D_Indirect_C;
     1604  Instructions[in_LD_IY_Plus_D_Indirect_D] := LD_IY_Plus_D_Indirect_D;
     1605  Instructions[in_LD_IY_Plus_D_Indirect_E] := LD_IY_Plus_D_Indirect_E;
     1606  Instructions[in_LD_IY_Plus_D_Indirect_H] := LD_IY_Plus_D_Indirect_H;
     1607  Instructions[in_LD_IY_Plus_D_Indirect_L] := LD_IY_Plus_D_Indirect_L;
     1608  Instructions[in_LD_IY_Plus_D_Indirect_A] := LD_IY_Plus_D_Indirect_A;
     1609  Instructions[in_LD_A_IY_Plus_D_Indirect] := LD_A_IY_Plus_D_Indirect;
     1610  Instructions[in_ADD_A_IY_Plus_D_Indirect] := ADD_A_IY_Plus_D_Indirect;
     1611  Instructions[in_ADC_A_IY_Plus_D_Indirect] := ADC_A_IY_Plus_D_Indirect;
     1612  Instructions[in_SUB_IY_Plus_D_Indirect] := SUB_IY_Plus_D_Indirect;
     1613  Instructions[in_SBC_A_IY_Plus_D_Indirect] := SBC_A_IY_Plus_D_Indirect;
     1614  Instructions[in_AND_IY_Plus_D_Indirect] := AND_IY_Plus_D_Indirect;
     1615  Instructions[in_XOR_IY_Plus_D_Indirect] := XOR_IY_Plus_D_Indirect;
     1616  Instructions[in_OR_IY_Plus_D_Indirect] := OR_IY_Plus_D_Indirect;
     1617  Instructions[in_CP_IY_Plus_D_Indirect] := CP_IY_Plus_D_Indirect;
     1618  Instructions[in_POP_IY] := POP_IY;
     1619  Instructions[in_EX_SP_Indirect_IY] := EX_SP_Indirect_IY;
     1620  Instructions[in_PUSH_IY] := PUSH_IY;
     1621  Instructions[in_JP_IY_Indirect] := JP_IY_Indirect;
     1622  Instructions[in_LD_SP_IY] := LD_SP_IY;
     1623  Instructions[in_RLC_IY_Plus_D_Indirect] := RLC_IY_Plus_D_Indirect;
     1624  Instructions[in_RRC_IY_Plus_D_Indirect] := RRC_IY_Plus_D_Indirect;
     1625  Instructions[in_RL_IY_Plus_D_Indirect] := RL_IY_Plus_D_Indirect;
     1626  Instructions[in_RR_IY_Plus_D_Indirect] := RR_IY_Plus_D_Indirect;
     1627  Instructions[in_SLA_IY_Plus_D_Indirect] := SLA_IY_Plus_D_Indirect;
     1628  Instructions[in_SRA_IY_Plus_D_Indirect] := SRA_IY_Plus_D_Indirect;
     1629  Instructions[in_SRL_IY_Plus_D_Indirect] := SRL_IY_Plus_D_Indirect;
     1630  Instructions[in_BIT_0_IY_Plus_D_Indirect] := BIT_0_IY_Plus_D_Indirect;
     1631  Instructions[in_BIT_1_IY_Plus_D_Indirect] := BIT_1_IY_Plus_D_Indirect;
     1632  Instructions[in_BIT_2_IY_Plus_D_Indirect] := BIT_2_IY_Plus_D_Indirect;
     1633  Instructions[in_BIT_3_IY_Plus_D_Indirect] := BIT_3_IY_Plus_D_Indirect;
     1634  Instructions[in_BIT_4_IY_Plus_D_Indirect] := BIT_4_IY_Plus_D_Indirect;
     1635  Instructions[in_BIT_5_IY_Plus_D_Indirect] := BIT_5_IY_Plus_D_Indirect;
     1636  Instructions[in_BIT_6_IY_Plus_D_Indirect] := BIT_6_IY_Plus_D_Indirect;
     1637  Instructions[in_BIT_7_IY_Plus_D_Indirect] := BIT_7_IY_Plus_D_Indirect;
     1638  Instructions[in_RES_0_IY_Plus_D_Indirect] := RES_0_IY_Plus_D_Indirect;
     1639  Instructions[in_RES_1_IY_Plus_D_Indirect] := RES_1_IY_Plus_D_Indirect;
     1640  Instructions[in_RES_2_IY_Plus_D_Indirect] := RES_2_IY_Plus_D_Indirect;
     1641  Instructions[in_RES_3_IY_Plus_D_Indirect] := RES_3_IY_Plus_D_Indirect;
     1642  Instructions[in_RES_4_IY_Plus_D_Indirect] := RES_4_IY_Plus_D_Indirect;
     1643  Instructions[in_RES_5_IY_Plus_D_Indirect] := RES_5_IY_Plus_D_Indirect;
     1644  Instructions[in_RES_6_IY_Plus_D_Indirect] := RES_6_IY_Plus_D_Indirect;
     1645  Instructions[in_RES_7_IY_Plus_D_Indirect] := RES_7_IY_Plus_D_Indirect;
     1646  Instructions[in_SET_0_IY_Plus_D_Indirect] := SET_0_IY_Plus_D_Indirect;
     1647  Instructions[in_SET_1_IY_Plus_D_Indirect] := SET_1_IY_Plus_D_Indirect;
     1648  Instructions[in_SET_2_IY_Plus_D_Indirect] := SET_2_IY_Plus_D_Indirect;
     1649  Instructions[in_SET_3_IY_Plus_D_Indirect] := SET_3_IY_Plus_D_Indirect;
     1650  Instructions[in_SET_4_IY_Plus_D_Indirect] := SET_4_IY_Plus_D_Indirect;
     1651  Instructions[in_SET_5_IY_Plus_D_Indirect] := SET_5_IY_Plus_D_Indirect;
     1652  Instructions[in_SET_6_IY_Plus_D_Indirect] := SET_6_IY_Plus_D_Indirect;
     1653  Instructions[in_SET_7_IY_Plus_D_Indirect] := SET_7_IY_Plus_D_Indirect;
    3561654end;
    3571655
    3581656procedure TCpuZ80.NOP;
    3591657begin
    360   // No operation
    361 end;
    362 
    363 procedure TCpuZ80.LD_HL_nn;
     1658  // No opearation
     1659end;
     1660
     1661procedure TCpuZ80.LD_BC_NN;
     1662begin
     1663  BC.Value := ReadWord;
     1664end;
     1665
     1666procedure TCpuZ80.LD_BC_Indirect_A;
     1667begin
     1668  DoWrite(BC.Value, A);
     1669end;
     1670
     1671procedure TCpuZ80.INC_BC;
     1672begin
     1673  Inc(BC.Value);
     1674end;
     1675
     1676procedure TCpuZ80.INC_B;
     1677begin
     1678  Inc(BC.B);
     1679end;
     1680
     1681procedure TCpuZ80.DEC_B;
     1682begin
     1683  Dec(BC.B);
     1684end;
     1685
     1686procedure TCpuZ80.LD_B_N;
     1687begin
     1688  BC.B := ReadByte;
     1689end;
     1690
     1691procedure TCpuZ80.RLCA;
     1692begin
     1693  Carry := (A and $80) <> 0;
     1694  A := A shl 1;
     1695end;
     1696
     1697procedure TCpuZ80.EX_AF_AF_Pair;
     1698begin
     1699  NotImplemented;
     1700end;
     1701
     1702procedure TCpuZ80.ADD_HL_BC;
     1703begin
     1704  HL.Value := HL.Value + BC.Value;
     1705end;
     1706
     1707procedure TCpuZ80.LD_A_BC_Indirect;
     1708begin
     1709  NotImplemented;
     1710end;
     1711
     1712procedure TCpuZ80.DEC_BC;
     1713begin
     1714  NotImplemented;
     1715end;
     1716
     1717procedure TCpuZ80.INC_C;
     1718begin
     1719  NotImplemented;
     1720end;
     1721
     1722procedure TCpuZ80.DEC_C;
     1723begin
     1724  NotImplemented;
     1725end;
     1726
     1727procedure TCpuZ80.LD_C_N;
     1728begin
     1729  NotImplemented;
     1730end;
     1731
     1732procedure TCpuZ80.RRCA;
     1733begin
     1734  NotImplemented;
     1735end;
     1736
     1737procedure TCpuZ80.DJNZ_D;
     1738begin
     1739  Djnz;
     1740end;
     1741
     1742procedure TCpuZ80.LD_DE_NN;
     1743begin
     1744  DE.Value := ReadWord;
     1745end;
     1746
     1747procedure TCpuZ80.LD_DE_Indirect_A;
     1748begin
     1749  NotImplemented;
     1750end;
     1751
     1752procedure TCpuZ80.INC_DE;
     1753begin
     1754  NotImplemented;
     1755end;
     1756
     1757procedure TCpuZ80.INC_D;
     1758begin
     1759  NotImplemented;
     1760end;
     1761
     1762procedure TCpuZ80.DEC_D;
     1763begin
     1764  NotImplemented;
     1765end;
     1766
     1767procedure TCpuZ80.LD_D_N;
     1768begin
     1769  NotImplemented;
     1770end;
     1771
     1772procedure TCpuZ80.RLA;
     1773begin
     1774  NotImplemented;
     1775end;
     1776
     1777procedure TCpuZ80.JR_D;
     1778begin
     1779  Jr(True);
     1780end;
     1781
     1782procedure TCpuZ80.ADD_HL_DE;
     1783begin
     1784  NotImplemented;
     1785end;
     1786
     1787procedure TCpuZ80.LD_A_DE_Indirect;
     1788begin
     1789  NotImplemented;
     1790end;
     1791
     1792procedure TCpuZ80.DEC_DE;
     1793begin
     1794  NotImplemented;
     1795end;
     1796
     1797procedure TCpuZ80.INC_E;
     1798begin
     1799  NotImplemented;
     1800end;
     1801
     1802procedure TCpuZ80.DEC_E;
     1803begin
     1804  NotImplemented;
     1805end;
     1806
     1807procedure TCpuZ80.LD_E_N;
     1808begin
     1809  NotImplemented;
     1810end;
     1811
     1812procedure TCpuZ80.RRA;
     1813begin
     1814  NotImplemented;
     1815end;
     1816
     1817procedure TCpuZ80.JR_NZ_D;
     1818begin
     1819  Jr(not Zero)
     1820end;
     1821
     1822procedure TCpuZ80.LD_HL_NN;
    3641823begin
    3651824  HL.Value := ReadWord;
    3661825end;
    3671826
    368 procedure TCpuZ80.LD_BC_nn;
    369 begin
    370   BC.Value := ReadWord;
    371 end;
    372 
    373 procedure TCpuZ80.LD_DE_nn;
    374 begin
    375   DE.Value := ReadWord;
    376 end;
    377 
    378 procedure TCpuZ80.LD_SP_nn;
     1827procedure TCpuZ80.LD_NN_Indirect_HL;
     1828begin
     1829  NotImplemented;
     1830end;
     1831
     1832procedure TCpuZ80.INC_HL;
     1833begin
     1834  Inc(HL.Value);
     1835end;
     1836
     1837procedure TCpuZ80.INC_H;
     1838begin
     1839  NotImplemented;
     1840end;
     1841
     1842procedure TCpuZ80.DEC_H;
     1843begin
     1844  NotImplemented;
     1845end;
     1846
     1847procedure TCpuZ80.LD_H_N;
     1848begin
     1849  NotImplemented;
     1850end;
     1851
     1852procedure TCpuZ80.DAA;
     1853begin
     1854  NotImplemented;
     1855end;
     1856
     1857procedure TCpuZ80.JR_Z_D;
     1858begin
     1859  NotImplemented;
     1860end;
     1861
     1862procedure TCpuZ80.ADD_HL_HL;
     1863begin
     1864  NotImplemented;
     1865end;
     1866
     1867procedure TCpuZ80.LD_HL_NN_Indirect;
     1868begin
     1869  NotImplemented;
     1870end;
     1871
     1872procedure TCpuZ80.DEC_HL;
     1873begin
     1874  Dec(HL.Value);
     1875end;
     1876
     1877procedure TCpuZ80.INC_L;
     1878begin
     1879  NotImplemented;
     1880end;
     1881
     1882procedure TCpuZ80.DEC_L;
     1883begin
     1884  NotImplemented;
     1885end;
     1886
     1887procedure TCpuZ80.LD_L_N;
     1888begin
     1889  NotImplemented;
     1890end;
     1891
     1892procedure TCpuZ80.CPL;
     1893begin
     1894  NotImplemented;
     1895end;
     1896
     1897procedure TCpuZ80.JR_NC_D;
     1898begin
     1899  Jr(not Carry);
     1900end;
     1901
     1902procedure TCpuZ80.LD_SP_NN;
    3791903begin
    3801904  SP := ReadWord;
    3811905end;
    3821906
    383 procedure TCpuZ80.JP_nn;
     1907procedure TCpuZ80.LD_NN_Indirect_A;
     1908begin
     1909  DoWrite(ReadWord, A);
     1910end;
     1911
     1912procedure TCpuZ80.INC_SP;
     1913begin
     1914  NotImplemented;
     1915end;
     1916
     1917procedure TCpuZ80.INC_HL_Indirect;
     1918begin
     1919  NotImplemented;
     1920end;
     1921
     1922procedure TCpuZ80.DEC_HL_Indirect;
     1923begin
     1924  NotImplemented;
     1925end;
     1926
     1927procedure TCpuZ80.LD_HL_Indirect_N;
     1928begin
     1929  DoWrite(HL.Value, ReadByte);
     1930end;
     1931
     1932procedure TCpuZ80.SCF;
     1933begin
     1934  NotImplemented;
     1935end;
     1936
     1937procedure TCpuZ80.JR_C_D;
     1938begin
     1939  NotImplemented;
     1940end;
     1941
     1942procedure TCpuZ80.ADD_HL_SP;
     1943begin
     1944  NotImplemented;
     1945end;
     1946
     1947procedure TCpuZ80.LD_A_NN_Indirect;
     1948begin
     1949  A := DoRead(ReadWord);
     1950end;
     1951
     1952procedure TCpuZ80.DEC_SP;
     1953begin
     1954  NotImplemented;
     1955end;
     1956
     1957procedure TCpuZ80.INC_A;
     1958begin
     1959  NotImplemented;
     1960end;
     1961
     1962procedure TCpuZ80.DEC_A;
     1963begin
     1964  NotImplemented;
     1965end;
     1966
     1967procedure TCpuZ80.LD_A_N;
     1968begin
     1969  A := ReadByte;
     1970end;
     1971
     1972procedure TCpuZ80.CCF;
     1973begin
     1974  NotImplemented;
     1975end;
     1976
     1977procedure TCpuZ80.LD_B_B;
     1978begin
     1979  NotImplemented;
     1980end;
     1981
     1982procedure TCpuZ80.LD_B_C;
     1983begin
     1984  NotImplemented;
     1985end;
     1986
     1987procedure TCpuZ80.LD_B_D;
     1988begin
     1989  NotImplemented;
     1990end;
     1991
     1992procedure TCpuZ80.LD_B_E;
     1993begin
     1994  NotImplemented;
     1995end;
     1996
     1997procedure TCpuZ80.LD_B_H;
     1998begin
     1999  NotImplemented;
     2000end;
     2001
     2002procedure TCpuZ80.LD_B_L;
     2003begin
     2004  NotImplemented;
     2005end;
     2006
     2007procedure TCpuZ80.LD_B_HL_Indirect;
     2008begin
     2009  NotImplemented;
     2010end;
     2011
     2012procedure TCpuZ80.LD_B_A;
     2013begin
     2014  BC.B := A;
     2015end;
     2016
     2017procedure TCpuZ80.LD_C_B;
     2018begin
     2019  NotImplemented;
     2020end;
     2021
     2022procedure TCpuZ80.LD_C_C;
     2023begin
     2024  NotImplemented;
     2025end;
     2026
     2027procedure TCpuZ80.LD_C_D;
     2028begin
     2029  NotImplemented;
     2030end;
     2031
     2032procedure TCpuZ80.LD_C_E;
     2033begin
     2034  NotImplemented;
     2035end;
     2036
     2037procedure TCpuZ80.LD_C_H;
     2038begin
     2039  NotImplemented;
     2040end;
     2041
     2042procedure TCpuZ80.LD_C_L;
     2043begin
     2044  NotImplemented;
     2045end;
     2046
     2047procedure TCpuZ80.LD_C_HL_Indirect;
     2048begin
     2049  BC.C := DoRead(HL.Value);
     2050end;
     2051
     2052procedure TCpuZ80.LD_C_A;
     2053begin
     2054  BC.C := A;
     2055end;
     2056
     2057procedure TCpuZ80.LD_D_B;
     2058begin
     2059  NotImplemented;
     2060end;
     2061
     2062procedure TCpuZ80.LD_D_C;
     2063begin
     2064  NotImplemented;
     2065end;
     2066
     2067procedure TCpuZ80.LD_D_D;
     2068begin
     2069  NotImplemented;
     2070end;
     2071
     2072procedure TCpuZ80.LD_D_E;
     2073begin
     2074  NotImplemented;
     2075end;
     2076
     2077procedure TCpuZ80.LD_D_H;
     2078begin
     2079  NotImplemented;
     2080end;
     2081
     2082procedure TCpuZ80.LD_D_L;
     2083begin
     2084  NotImplemented;
     2085end;
     2086
     2087procedure TCpuZ80.LD_D_HL_Indirect;
     2088begin
     2089  NotImplemented;
     2090end;
     2091
     2092procedure TCpuZ80.LD_D_A;
     2093begin
     2094  NotImplemented;
     2095end;
     2096
     2097procedure TCpuZ80.LD_E_B;
     2098begin
     2099  NotImplemented;
     2100end;
     2101
     2102procedure TCpuZ80.LD_E_C;
     2103begin
     2104  NotImplemented;
     2105end;
     2106
     2107procedure TCpuZ80.LD_E_D;
     2108begin
     2109  NotImplemented;
     2110end;
     2111
     2112procedure TCpuZ80.LD_E_E;
     2113begin
     2114  NotImplemented;
     2115end;
     2116
     2117procedure TCpuZ80.LD_E_H;
     2118begin
     2119  NotImplemented;
     2120end;
     2121
     2122procedure TCpuZ80.LD_E_L;
     2123begin
     2124  NotImplemented;
     2125end;
     2126
     2127procedure TCpuZ80.LD_E_HL_Indirect;
     2128begin
     2129  NotImplemented;
     2130end;
     2131
     2132procedure TCpuZ80.LD_E_A;
     2133begin
     2134  NotImplemented;
     2135end;
     2136
     2137procedure TCpuZ80.LD_H_B;
     2138begin
     2139  HL.H := BC.B;
     2140end;
     2141
     2142procedure TCpuZ80.LD_H_C;
     2143begin
     2144  NotImplemented;
     2145end;
     2146
     2147procedure TCpuZ80.LD_H_D;
     2148begin
     2149  NotImplemented;
     2150end;
     2151
     2152procedure TCpuZ80.LD_H_E;
     2153begin
     2154  NotImplemented;
     2155end;
     2156
     2157procedure TCpuZ80.LD_H_H;
     2158begin
     2159  NotImplemented;
     2160end;
     2161
     2162procedure TCpuZ80.LD_H_L;
     2163begin
     2164  NotImplemented;
     2165end;
     2166
     2167procedure TCpuZ80.LD_H_HL_Indirect;
     2168begin
     2169  NotImplemented;
     2170end;
     2171
     2172procedure TCpuZ80.LD_H_A;
     2173begin
     2174  NotImplemented;
     2175end;
     2176
     2177procedure TCpuZ80.LD_L_B;
     2178begin
     2179  NotImplemented;
     2180end;
     2181
     2182procedure TCpuZ80.LD_L_C;
     2183begin
     2184  HL.L := BC.C;
     2185end;
     2186
     2187procedure TCpuZ80.LD_L_D;
     2188begin
     2189  NotImplemented;
     2190end;
     2191
     2192procedure TCpuZ80.LD_L_E;
     2193begin
     2194  NotImplemented;
     2195end;
     2196
     2197procedure TCpuZ80.LD_L_H;
     2198begin
     2199  NotImplemented;
     2200end;
     2201
     2202procedure TCpuZ80.LD_L_L;
     2203begin
     2204  NotImplemented;
     2205end;
     2206
     2207procedure TCpuZ80.LD_L_HL_Indirect;
     2208begin
     2209  NotImplemented;
     2210end;
     2211
     2212procedure TCpuZ80.LD_L_A;
     2213begin
     2214  NotImplemented;
     2215end;
     2216
     2217procedure TCpuZ80.LD_HL_Indirect_B;
     2218begin
     2219  NotImplemented;
     2220end;
     2221
     2222procedure TCpuZ80.LD_HL_Indirect_C;
     2223begin
     2224  NotImplemented;
     2225end;
     2226
     2227procedure TCpuZ80.LD_HL_Indirect_D;
     2228begin
     2229  DoWrite(HL.Value, DE.D);
     2230end;
     2231
     2232procedure TCpuZ80.LD_HL_Indirect_E;
     2233begin
     2234  DoWrite(HL.Value, DE.E);
     2235end;
     2236
     2237procedure TCpuZ80.LD_HL_Indirect_H;
     2238begin
     2239  NotImplemented;
     2240end;
     2241
     2242procedure TCpuZ80.LD_HL_Indirect_L;
     2243begin
     2244  NotImplemented;
     2245end;
     2246
     2247procedure TCpuZ80.HALT;
     2248begin
     2249  FThread.Terminate;
     2250end;
     2251
     2252procedure TCpuZ80.LD_HL_Indirect_A;
     2253begin
     2254  NotImplemented;
     2255end;
     2256
     2257procedure TCpuZ80.LD_A_B;
     2258begin
     2259  NotImplemented;
     2260end;
     2261
     2262procedure TCpuZ80.LD_A_C;
     2263begin
     2264  A := BC.C;
     2265end;
     2266
     2267procedure TCpuZ80.LD_A_D;
     2268begin
     2269  NotImplemented;
     2270end;
     2271
     2272procedure TCpuZ80.LD_A_E;
     2273begin
     2274  NotImplemented;
     2275end;
     2276
     2277procedure TCpuZ80.LD_A_H;
     2278begin
     2279  NotImplemented;
     2280end;
     2281
     2282procedure TCpuZ80.LD_A_L;
     2283begin
     2284  NotImplemented;
     2285end;
     2286
     2287procedure TCpuZ80.LD_A_HL_Indirect;
     2288begin
     2289  A := DoRead(HL.Value);
     2290end;
     2291
     2292procedure TCpuZ80.LD_A_A;
     2293begin
     2294  NotImplemented;
     2295end;
     2296
     2297procedure TCpuZ80.ADD_A_B;
     2298begin
     2299  NotImplemented;
     2300end;
     2301
     2302procedure TCpuZ80.ADD_A_C;
     2303begin
     2304  NotImplemented;
     2305end;
     2306
     2307procedure TCpuZ80.ADD_A_D;
     2308begin
     2309  NotImplemented;
     2310end;
     2311
     2312procedure TCpuZ80.ADD_A_E;
     2313begin
     2314  NotImplemented;
     2315end;
     2316
     2317procedure TCpuZ80.ADD_A_H;
     2318begin
     2319  NotImplemented;
     2320end;
     2321
     2322procedure TCpuZ80.ADD_A_L;
     2323begin
     2324  NotImplemented;
     2325end;
     2326
     2327procedure TCpuZ80.ADD_A_HL_Indirect;
     2328begin
     2329  NotImplemented;
     2330end;
     2331
     2332procedure TCpuZ80.ADD_A_A;
     2333begin
     2334  NotImplemented;
     2335end;
     2336
     2337procedure TCpuZ80.ADC_A_B;
     2338begin
     2339  NotImplemented;
     2340end;
     2341
     2342procedure TCpuZ80.ADC_A_C;
     2343begin
     2344  NotImplemented;
     2345end;
     2346
     2347procedure TCpuZ80.ADC_A_D;
     2348begin
     2349  NotImplemented;
     2350end;
     2351
     2352procedure TCpuZ80.ADC_A_E;
     2353begin
     2354  NotImplemented;
     2355end;
     2356
     2357procedure TCpuZ80.ADC_A_H;
     2358begin
     2359  NotImplemented;
     2360end;
     2361
     2362procedure TCpuZ80.ADC_A_L;
     2363begin
     2364  NotImplemented;
     2365end;
     2366
     2367procedure TCpuZ80.ADC_A_HL_Indirect;
     2368begin
     2369  NotImplemented;
     2370end;
     2371
     2372procedure TCpuZ80.ADC_A_A;
     2373begin
     2374  NotImplemented;
     2375end;
     2376
     2377procedure TCpuZ80.SUB_B;
     2378begin
     2379  NotImplemented;
     2380end;
     2381
     2382procedure TCpuZ80.SUB_C;
     2383begin
     2384  NotImplemented;
     2385end;
     2386
     2387procedure TCpuZ80.SUB_D;
     2388begin
     2389  NotImplemented;
     2390end;
     2391
     2392procedure TCpuZ80.SUB_E;
     2393begin
     2394  NotImplemented;
     2395end;
     2396
     2397procedure TCpuZ80.SUB_H;
     2398begin
     2399  NotImplemented;
     2400end;
     2401
     2402procedure TCpuZ80.SUB_L;
     2403begin
     2404  NotImplemented;
     2405end;
     2406
     2407procedure TCpuZ80.SUB_HL_Indirect;
     2408begin
     2409  NotImplemented;
     2410end;
     2411
     2412procedure TCpuZ80.SUB_A;
     2413begin
     2414  NotImplemented;
     2415end;
     2416
     2417procedure TCpuZ80.SBC_A_B;
     2418begin
     2419  NotImplemented;
     2420end;
     2421
     2422procedure TCpuZ80.SBC_A_C;
     2423begin
     2424  NotImplemented;
     2425end;
     2426
     2427procedure TCpuZ80.SBC_A_D;
     2428begin
     2429  NotImplemented;
     2430end;
     2431
     2432procedure TCpuZ80.SBC_A_E;
     2433begin
     2434  NotImplemented;
     2435end;
     2436
     2437procedure TCpuZ80.SBC_A_H;
     2438begin
     2439  NotImplemented;
     2440end;
     2441
     2442procedure TCpuZ80.SBC_A_L;
     2443begin
     2444  NotImplemented;
     2445end;
     2446
     2447procedure TCpuZ80.SBC_A_HL_Indirect;
     2448begin
     2449  NotImplemented;
     2450end;
     2451
     2452procedure TCpuZ80.SBC_A_A;
     2453begin
     2454  NotImplemented;
     2455end;
     2456
     2457procedure TCpuZ80.AND_B;
     2458begin
     2459  NotImplemented;
     2460end;
     2461
     2462procedure TCpuZ80.AND_C;
     2463begin
     2464  NotImplemented;
     2465end;
     2466
     2467procedure TCpuZ80.AND_D;
     2468begin
     2469  NotImplemented;
     2470end;
     2471
     2472procedure TCpuZ80.AND_E;
     2473begin
     2474  NotImplemented;
     2475end;
     2476
     2477procedure TCpuZ80.AND_H;
     2478begin
     2479  NotImplemented;
     2480end;
     2481
     2482procedure TCpuZ80.AND_L;
     2483begin
     2484  NotImplemented;
     2485end;
     2486
     2487procedure TCpuZ80.AND_HL_Indirect;
     2488begin
     2489  NotImplemented;
     2490end;
     2491
     2492procedure TCpuZ80.AND_A;
     2493begin
     2494  NotImplemented;
     2495end;
     2496
     2497procedure TCpuZ80.XOR_B;
     2498begin
     2499  A := A xor BC.B;
     2500end;
     2501
     2502procedure TCpuZ80.XOR_C;
     2503begin
     2504  NotImplemented;
     2505end;
     2506
     2507procedure TCpuZ80.XOR_D;
     2508begin
     2509  NotImplemented;
     2510end;
     2511
     2512procedure TCpuZ80.XOR_E;
     2513begin
     2514  NotImplemented;
     2515end;
     2516
     2517procedure TCpuZ80.XOR_H;
     2518begin
     2519  NotImplemented;
     2520end;
     2521
     2522procedure TCpuZ80.XOR_L;
     2523begin
     2524  NotImplemented;
     2525end;
     2526
     2527procedure TCpuZ80.XOR_HL_Indirect;
     2528begin
     2529  NotImplemented;
     2530end;
     2531
     2532procedure TCpuZ80.XOR_A;
     2533begin
     2534  A := A xor A;
     2535end;
     2536
     2537procedure TCpuZ80.OR_B;
     2538begin
     2539  NotImplemented;
     2540end;
     2541
     2542procedure TCpuZ80.OR_C;
     2543begin
     2544  NotImplemented;
     2545end;
     2546
     2547procedure TCpuZ80.OR_D;
     2548begin
     2549  NotImplemented;
     2550end;
     2551
     2552procedure TCpuZ80.OR_E;
     2553begin
     2554  NotImplemented;
     2555end;
     2556
     2557procedure TCpuZ80.OR_H;
     2558begin
     2559  NotImplemented;
     2560end;
     2561
     2562procedure TCpuZ80.OR_L;
     2563begin
     2564  NotImplemented;
     2565end;
     2566
     2567procedure TCpuZ80.OR_HL_Indirect;
     2568begin
     2569  NotImplemented;
     2570end;
     2571
     2572procedure TCpuZ80.OR_A;
     2573begin
     2574  A := A or A;
     2575end;
     2576
     2577procedure TCpuZ80.CP_B;
     2578begin
     2579  NotImplemented;
     2580end;
     2581
     2582procedure TCpuZ80.CP_C;
     2583begin
     2584  NotImplemented;
     2585end;
     2586
     2587procedure TCpuZ80.CP_D;
     2588begin
     2589  Cp(DE.D);
     2590end;
     2591
     2592procedure TCpuZ80.CP_E;
     2593begin
     2594  Cp(DE.E);
     2595end;
     2596
     2597procedure TCpuZ80.CP_H;
     2598begin
     2599  NotImplemented;
     2600end;
     2601
     2602procedure TCpuZ80.CP_L;
     2603begin
     2604  NotImplemented;
     2605end;
     2606
     2607procedure TCpuZ80.CP_HL_Indirect;
     2608begin
     2609  NotImplemented;
     2610end;
     2611
     2612procedure TCpuZ80.CP_A;
     2613begin
     2614  NotImplemented;
     2615end;
     2616
     2617procedure TCpuZ80.RET_NZ;
     2618begin
     2619  NotImplemented;
     2620end;
     2621
     2622procedure TCpuZ80.POP_BC;
     2623begin
     2624  NotImplemented;
     2625end;
     2626
     2627procedure TCpuZ80.JP_NZ_NN;
     2628begin
     2629  Jp(not Zero);
     2630end;
     2631
     2632procedure TCpuZ80.JP_NN;
    3842633begin
    3852634  PC := ReadWord;
    3862635end;
    3872636
    388 procedure TCpuZ80.LD_A_n;
    389 begin
    390   A := ReadByte;
    391 end;
    392 
    393 procedure TCpuZ80.LD_B_n;
    394 begin
    395   BC.B := ReadByte;
    396 end;
    397 
    398 procedure TCpuZ80.LD_A_C;
    399 begin
    400   A := BC.C;
    401 end;
    402 
    403 procedure TCpuZ80.LD_HL_Indirect_n;
    404 begin
    405   DoWrite(HL.Value, ReadByte);
    406 end;
    407 
    408 procedure TCpuZ80.LD_nn_Indirect_A;
    409 begin
    410   DoWrite(ReadWord, A);
    411 end;
    412 
    413 procedure TCpuZ80.LD_HL_Indirect_D;
    414 begin
    415   DoWrite(HL.Value, DE.D);
    416 end;
    417 
    418 procedure TCpuZ80.LD_HL_Indirect_E;
    419 begin
    420   DoWrite(HL.Value, DE.E);
    421 end;
    422 
    423 procedure TCpuZ80.LD_C_HL_Indirect;
    424 begin
    425   BC.C := DoRead(HL.Value);
    426 end;
    427 
    428 procedure TCpuZ80.LD_A_HL_Indirect;
    429 begin
    430   A := DoRead(HL.Value);
    431 end;
    432 
    433 procedure TCpuZ80.LD_BC_Indirect_A;
    434 begin
    435   DoWrite(BC.Value, A);
     2637procedure TCpuZ80.CALL_NZ_NN;
     2638begin
     2639  NotImplemented;
     2640end;
     2641
     2642procedure TCpuZ80.PUSH_BC;
     2643begin
     2644  PushWord(BC.Value)
     2645end;
     2646
     2647procedure TCpuZ80.ADD_A_N;
     2648begin
     2649  NotImplemented;
     2650end;
     2651
     2652procedure TCpuZ80.RST_00H;
     2653begin
     2654  Call($00);
     2655end;
     2656
     2657procedure TCpuZ80.RET_Z;
     2658begin
     2659  RetCond(Zero);
     2660end;
     2661
     2662procedure TCpuZ80.RET;
     2663begin
     2664  RetCond(True);
     2665end;
     2666
     2667procedure TCpuZ80.JP_Z_NN;
     2668begin
     2669  NotImplemented;
     2670end;
     2671
     2672procedure TCpuZ80.CALL_Z_NN;
     2673begin
     2674  NotImplemented;
     2675end;
     2676
     2677procedure TCpuZ80.CALL_NN;
     2678var
     2679  TempWord: Word;
     2680begin
     2681  TempWord := ReadWord;
     2682  if DebugMode = dmStepOver then begin
     2683    DebugStopAddress := PC;
     2684    DebugMode := dmStopAddress;
     2685  end;
     2686  Call(TempWord);
     2687end;
     2688
     2689procedure TCpuZ80.ADC_A_N;
     2690begin
     2691  NotImplemented;
     2692end;
     2693
     2694procedure TCpuZ80.RST_08H;
     2695begin
     2696  Call($08);
     2697end;
     2698
     2699procedure TCpuZ80.RET_NC;
     2700begin
     2701  NotImplemented;
     2702end;
     2703
     2704procedure TCpuZ80.POP_DE;
     2705begin
     2706  NotImplemented;
     2707end;
     2708
     2709procedure TCpuZ80.JP_NC_NN;
     2710begin
     2711  NotImplemented;
     2712end;
     2713
     2714procedure TCpuZ80.OUT_N_Indirect_A;
     2715begin
     2716  DoOutput(ReadByte, A);
     2717end;
     2718
     2719procedure TCpuZ80.CALL_NC_NN;
     2720begin
     2721  NotImplemented;
     2722end;
     2723
     2724procedure TCpuZ80.PUSH_DE;
     2725begin
     2726  PushWord(DE.Value);
     2727end;
     2728
     2729procedure TCpuZ80.SUB_N;
     2730begin
     2731  NotImplemented;
     2732end;
     2733
     2734procedure TCpuZ80.RST_10H;
     2735begin
     2736  Call($10);
     2737end;
     2738
     2739procedure TCpuZ80.RET_C;
     2740begin
     2741  NotImplemented;
     2742end;
     2743
     2744procedure TCpuZ80.EXX;
     2745begin
     2746  NotImplemented;
     2747end;
     2748
     2749procedure TCpuZ80.JP_C_NN;
     2750begin
     2751  NotImplemented;
     2752end;
     2753
     2754procedure TCpuZ80.IN_A_N_Indirect;
     2755begin
     2756  NotImplemented;
     2757end;
     2758
     2759procedure TCpuZ80.CALL_C_NN;
     2760begin
     2761  NotImplemented;
     2762end;
     2763
     2764procedure TCpuZ80.SBC_A_N;
     2765begin
     2766  NotImplemented;
     2767end;
     2768
     2769procedure TCpuZ80.RST_18H;
     2770begin
     2771  Call($18);
     2772end;
     2773
     2774procedure TCpuZ80.RET_PO;
     2775begin
     2776  NotImplemented;
     2777end;
     2778
     2779procedure TCpuZ80.POP_HL;
     2780begin
     2781  NotImplemented;
     2782end;
     2783
     2784procedure TCpuZ80.JP_PO_NN;
     2785begin
     2786  NotImplemented;
     2787end;
     2788
     2789procedure TCpuZ80.EX_SP_Indirect_HL;
     2790begin
     2791  NotImplemented;
     2792end;
     2793
     2794procedure TCpuZ80.CALL_PO_NN;
     2795begin
     2796  NotImplemented;
     2797end;
     2798
     2799procedure TCpuZ80.PUSH_HL;
     2800begin
     2801  PushWord(HL.Value);
     2802end;
     2803
     2804procedure TCpuZ80.AND_N;
     2805begin
     2806  A := A and ReadByte;
     2807end;
     2808
     2809procedure TCpuZ80.RST_20H;
     2810begin
     2811  Call($20);
     2812end;
     2813
     2814procedure TCpuZ80.RET_PE;
     2815begin
     2816  NotImplemented;
     2817end;
     2818
     2819procedure TCpuZ80.JP_HL_Indirect;
     2820begin
     2821  NotImplemented;
     2822end;
     2823
     2824procedure TCpuZ80.JP_PE_NN;
     2825begin
     2826  NotImplemented;
     2827end;
     2828
     2829procedure TCpuZ80.EX_DE_HL;
     2830var
     2831  TempWord: Word;
     2832begin
     2833  TempWord := DE.Value;
     2834  DE.Value := HL.Value;
     2835  HL.Value := TempWord;
     2836end;
     2837
     2838procedure TCpuZ80.CALL_PE_NN;
     2839begin
     2840  NotImplemented;
     2841end;
     2842
     2843procedure TCpuZ80.XOR_N;
     2844begin
     2845  NotImplemented;
     2846end;
     2847
     2848procedure TCpuZ80.RST_28H;
     2849begin
     2850  Call($28);
     2851end;
     2852
     2853procedure TCpuZ80.RET_P;
     2854begin
     2855  NotImplemented;
     2856end;
     2857
     2858procedure TCpuZ80.POP_AF;
     2859begin
     2860  NotImplemented;
     2861end;
     2862
     2863procedure TCpuZ80.JP_P_NN;
     2864begin
     2865  NotImplemented;
     2866end;
     2867
     2868procedure TCpuZ80.DI;
     2869begin
     2870  InterruptEnabled := False;
     2871end;
     2872
     2873procedure TCpuZ80.CALL_P_NN;
     2874begin
     2875  NotImplemented;
     2876end;
     2877
     2878procedure TCpuZ80.PUSH_AF;
     2879begin
     2880  PushWord(A shl 8);
     2881end;
     2882
     2883procedure TCpuZ80.OR_N;
     2884begin
     2885  NotImplemented;
     2886end;
     2887
     2888procedure TCpuZ80.RST_30H;
     2889begin
     2890  Call($30);
     2891end;
     2892
     2893procedure TCpuZ80.RET_M;
     2894begin
     2895  NotImplemented;
     2896end;
     2897
     2898procedure TCpuZ80.LD_SP_HL;
     2899begin
     2900  NotImplemented;
     2901end;
     2902
     2903procedure TCpuZ80.JP_M_NN;
     2904begin
     2905  NotImplemented;
     2906end;
     2907
     2908procedure TCpuZ80.EI;
     2909begin
     2910  InterruptEnabled := True;
     2911end;
     2912
     2913procedure TCpuZ80.CALL_M_NN;
     2914begin
     2915  NotImplemented;
     2916end;
     2917
     2918procedure TCpuZ80.CP_N;
     2919begin
     2920  Cp(ReadByte);
     2921end;
     2922
     2923procedure TCpuZ80.RST_38H;
     2924begin
     2925  Call($38);
     2926end;
     2927
     2928procedure TCpuZ80.IN_B_C_Indirect;
     2929begin
     2930  NotImplemented;
     2931end;
     2932
     2933procedure TCpuZ80.OUT_C_Indirect_B;
     2934begin
     2935  NotImplemented;
     2936end;
     2937
     2938procedure TCpuZ80.SBC_HL_BC;
     2939begin
     2940  NotImplemented;
     2941end;
     2942
     2943procedure TCpuZ80.LD_NN_Indirect_BC;
     2944begin
     2945  NotImplemented;
     2946end;
     2947
     2948procedure TCpuZ80.NEG;
     2949begin
     2950  NotImplemented;
     2951end;
     2952
     2953procedure TCpuZ80.RETN;
     2954begin
     2955  NotImplemented;
     2956end;
     2957
     2958procedure TCpuZ80.IM_0;
     2959begin
     2960  NotImplemented;
     2961end;
     2962
     2963procedure TCpuZ80.LD_I_A;
     2964begin
     2965  NotImplemented;
     2966end;
     2967
     2968procedure TCpuZ80.IN_C_C_Indirect;
     2969begin
     2970  NotImplemented;
     2971end;
     2972
     2973procedure TCpuZ80.OUT_C_Indirect_C;
     2974begin
     2975  NotImplemented;
     2976end;
     2977
     2978procedure TCpuZ80.ADC_HL_BC;
     2979begin
     2980  NotImplemented;
     2981end;
     2982
     2983procedure TCpuZ80.LD_BC_NN_Indirect;
     2984begin
     2985  NotImplemented;
     2986end;
     2987
     2988procedure TCpuZ80.RETI;
     2989begin
     2990  NotImplemented;
     2991end;
     2992
     2993procedure TCpuZ80.LD_R_A;
     2994begin
     2995  NotImplemented;
     2996end;
     2997
     2998procedure TCpuZ80.IN_D_C_Indirect;
     2999begin
     3000  NotImplemented;
     3001end;
     3002
     3003procedure TCpuZ80.OUT_C_Indirect_D;
     3004begin
     3005  NotImplemented;
     3006end;
     3007
     3008procedure TCpuZ80.SBC_HL_DE;
     3009begin
     3010  HL.Value := HL.Value - DE.Value;
     3011end;
     3012
     3013procedure TCpuZ80.LD_NN_Indirect_DE;
     3014begin
     3015  NotImplemented;
     3016end;
     3017
     3018procedure TCpuZ80.IM_1;
     3019begin
     3020  InterruptMode := 1;
     3021end;
     3022
     3023procedure TCpuZ80.LD_A_I;
     3024begin
     3025  NotImplemented;
     3026end;
     3027
     3028procedure TCpuZ80.IN_E_C_Indirect;
     3029begin
     3030  NotImplemented;
     3031end;
     3032
     3033procedure TCpuZ80.OUT_C_Indirect_E;
     3034begin
     3035  NotImplemented;
     3036end;
     3037
     3038procedure TCpuZ80.ADC_HL_DE;
     3039begin
     3040  NotImplemented;
     3041end;
     3042
     3043procedure TCpuZ80.LD_DE_NN_Indirect;
     3044begin
     3045  NotImplemented;
     3046end;
     3047
     3048procedure TCpuZ80.IM_2;
     3049begin
     3050  NotImplemented;
     3051end;
     3052
     3053procedure TCpuZ80.LD_A_R;
     3054begin
     3055  NotImplemented;
     3056end;
     3057
     3058procedure TCpuZ80.IN_H_C_Indirect;
     3059begin
     3060  NotImplemented;
     3061end;
     3062
     3063procedure TCpuZ80.OUT_C_Indirect_H;
     3064begin
     3065  NotImplemented;
     3066end;
     3067
     3068procedure TCpuZ80.SBC_HL_HL;
     3069begin
     3070  NotImplemented;
     3071end;
     3072
     3073procedure TCpuZ80.RRD;
     3074begin
     3075  NotImplemented;
     3076end;
     3077
     3078procedure TCpuZ80.IN_L_C_Indirect;
     3079begin
     3080  NotImplemented;
     3081end;
     3082
     3083procedure TCpuZ80.OUT_C_Indirect_L;
     3084begin
     3085  NotImplemented;
     3086end;
     3087
     3088procedure TCpuZ80.ADC_HL_HL;
     3089begin
     3090  NotImplemented;
     3091end;
     3092
     3093procedure TCpuZ80.RLD;
     3094begin
     3095  NotImplemented;
     3096end;
     3097
     3098procedure TCpuZ80.SBC_HL_SP;
     3099begin
     3100  NotImplemented;
     3101end;
     3102
     3103procedure TCpuZ80.LD_NN_Indirect_SP;
     3104begin
     3105  NotImplemented;
     3106end;
     3107
     3108procedure TCpuZ80.IN_A_C_Indirect;
     3109begin
     3110  NotImplemented;
     3111end;
     3112
     3113procedure TCpuZ80.OUT_C_Indirect_A;
     3114begin
     3115  NotImplemented;
     3116end;
     3117
     3118procedure TCpuZ80.ADC_HL_SP;
     3119begin
     3120  NotImplemented;
     3121end;
     3122
     3123procedure TCpuZ80.LD_SP_NN_Indirect;
     3124begin
     3125  NotImplemented;
     3126end;
     3127
     3128procedure TCpuZ80.LDI;
     3129begin
     3130  NotImplemented;
     3131end;
     3132
     3133procedure TCpuZ80.CPI;
     3134begin
     3135  NotImplemented;
     3136end;
     3137
     3138procedure TCpuZ80.INI;
     3139begin
     3140  NotImplemented;
     3141end;
     3142
     3143procedure TCpuZ80.OUTI;
     3144begin
     3145  NotImplemented;
     3146end;
     3147
     3148procedure TCpuZ80.LDD;
     3149begin
     3150  NotImplemented;
     3151end;
     3152
     3153procedure TCpuZ80.CPD;
     3154begin
     3155  NotImplemented;
     3156end;
     3157
     3158procedure TCpuZ80.IND;
     3159begin
     3160  NotImplemented;
     3161end;
     3162
     3163procedure TCpuZ80.OUTD;
     3164begin
     3165  NotImplemented;
     3166end;
     3167
     3168procedure TCpuZ80.LDIR;
     3169begin
     3170  NotImplemented;
     3171end;
     3172
     3173procedure TCpuZ80.CPIR;
     3174begin
     3175  NotImplemented;
     3176end;
     3177
     3178procedure TCpuZ80.INIR;
     3179begin
     3180  NotImplemented;
     3181end;
     3182
     3183procedure TCpuZ80.OTIR;
     3184begin
     3185  NotImplemented;
     3186end;
     3187
     3188procedure TCpuZ80.LDDR;
     3189begin
     3190  NotImplemented;
     3191end;
     3192
     3193procedure TCpuZ80.CPDR;
     3194begin
     3195  NotImplemented;
     3196end;
     3197
     3198procedure TCpuZ80.INDR;
     3199begin
     3200  NotImplemented;
     3201end;
     3202
     3203procedure TCpuZ80.OTDR;
     3204begin
     3205  NotImplemented;
     3206end;
     3207
     3208procedure TCpuZ80.RLC_B;
     3209begin
     3210  NotImplemented;
     3211end;
     3212
     3213procedure TCpuZ80.RLC_C;
     3214begin
     3215  NotImplemented;
     3216end;
     3217
     3218procedure TCpuZ80.RLC_D;
     3219begin
     3220  NotImplemented;
     3221end;
     3222
     3223procedure TCpuZ80.RLC_E;
     3224begin
     3225  NotImplemented;
     3226end;
     3227
     3228procedure TCpuZ80.RLC_H;
     3229begin
     3230  NotImplemented;
     3231end;
     3232
     3233procedure TCpuZ80.RLC_L;
     3234begin
     3235  NotImplemented;
     3236end;
     3237
     3238procedure TCpuZ80.RLC_HL_Indirect;
     3239begin
     3240  NotImplemented;
     3241end;
     3242
     3243procedure TCpuZ80.RLC_A;
     3244begin
     3245  NotImplemented;
     3246end;
     3247
     3248procedure TCpuZ80.RRC_B;
     3249begin
     3250  NotImplemented;
     3251end;
     3252
     3253procedure TCpuZ80.RRC_C;
     3254begin
     3255  NotImplemented;
     3256end;
     3257
     3258procedure TCpuZ80.RRC_D;
     3259begin
     3260  NotImplemented;
     3261end;
     3262
     3263procedure TCpuZ80.RRC_E;
     3264begin
     3265  NotImplemented;
     3266end;
     3267
     3268procedure TCpuZ80.RRC_H;
     3269begin
     3270  NotImplemented;
     3271end;
     3272
     3273procedure TCpuZ80.RRC_L;
     3274begin
     3275  NotImplemented;
     3276end;
     3277
     3278procedure TCpuZ80.RRC_HL_Indirect;
     3279begin
     3280  NotImplemented;
     3281end;
     3282
     3283procedure TCpuZ80.RRC_A;
     3284begin
     3285  NotImplemented;
     3286end;
     3287
     3288procedure TCpuZ80.RL_B;
     3289begin
     3290  NotImplemented;
     3291end;
     3292
     3293procedure TCpuZ80.RL_C;
     3294begin
     3295  NotImplemented;
     3296end;
     3297
     3298procedure TCpuZ80.RL_D;
     3299begin
     3300  NotImplemented;
     3301end;
     3302
     3303procedure TCpuZ80.RL_E;
     3304begin
     3305  NotImplemented;
     3306end;
     3307
     3308procedure TCpuZ80.RL_H;
     3309begin
     3310  NotImplemented;
     3311end;
     3312
     3313procedure TCpuZ80.RL_L;
     3314begin
     3315  NotImplemented;
     3316end;
     3317
     3318procedure TCpuZ80.RL_HL_Indirect;
     3319begin
     3320  NotImplemented;
     3321end;
     3322
     3323procedure TCpuZ80.RL_A;
     3324begin
     3325  NotImplemented;
     3326end;
     3327
     3328procedure TCpuZ80.RR_B;
     3329begin
     3330  NotImplemented;
     3331end;
     3332
     3333procedure TCpuZ80.RR_C;
     3334begin
     3335  NotImplemented;
     3336end;
     3337
     3338procedure TCpuZ80.RR_D;
     3339begin
     3340  NotImplemented;
     3341end;
     3342
     3343procedure TCpuZ80.RR_E;
     3344begin
     3345  NotImplemented;
     3346end;
     3347
     3348procedure TCpuZ80.RR_H;
     3349begin
     3350  NotImplemented;
     3351end;
     3352
     3353procedure TCpuZ80.RR_L;
     3354begin
     3355  NotImplemented;
     3356end;
     3357
     3358procedure TCpuZ80.RR_HL_Indirect;
     3359begin
     3360  NotImplemented;
     3361end;
     3362
     3363procedure TCpuZ80.RR_A;
     3364begin
     3365  NotImplemented;
     3366end;
     3367
     3368procedure TCpuZ80.SLA_B;
     3369begin
     3370  NotImplemented;
     3371end;
     3372
     3373procedure TCpuZ80.SLA_C;
     3374begin
     3375  NotImplemented;
     3376end;
     3377
     3378procedure TCpuZ80.SLA_D;
     3379begin
     3380  NotImplemented;
     3381end;
     3382
     3383procedure TCpuZ80.SLA_E;
     3384begin
     3385  NotImplemented;
     3386end;
     3387
     3388procedure TCpuZ80.SLA_H;
     3389begin
     3390  NotImplemented;
     3391end;
     3392
     3393procedure TCpuZ80.SLA_L;
     3394begin
     3395  NotImplemented;
     3396end;
     3397
     3398procedure TCpuZ80.SLA_HL_Indirect;
     3399begin
     3400  NotImplemented;
     3401end;
     3402
     3403procedure TCpuZ80.SLA_A;
     3404begin
     3405  NotImplemented;
     3406end;
     3407
     3408procedure TCpuZ80.SRA_B;
     3409begin
     3410  NotImplemented;
     3411end;
     3412
     3413procedure TCpuZ80.SRA_C;
     3414begin
     3415  NotImplemented;
     3416end;
     3417
     3418procedure TCpuZ80.SRA_D;
     3419begin
     3420  NotImplemented;
     3421end;
     3422
     3423procedure TCpuZ80.SRA_E;
     3424begin
     3425  NotImplemented;
     3426end;
     3427
     3428procedure TCpuZ80.SRA_H;
     3429begin
     3430  NotImplemented;
     3431end;
     3432
     3433procedure TCpuZ80.SRA_L;
     3434begin
     3435  NotImplemented;
     3436end;
     3437
     3438procedure TCpuZ80.SRA_HL_Indirect;
     3439begin
     3440  NotImplemented;
     3441end;
     3442
     3443procedure TCpuZ80.SRA_A;
     3444begin
     3445  NotImplemented;
     3446end;
     3447
     3448procedure TCpuZ80.SRL_B;
     3449begin
     3450  NotImplemented;
     3451end;
     3452
     3453procedure TCpuZ80.SRL_C;
     3454begin
     3455  NotImplemented;
     3456end;
     3457
     3458procedure TCpuZ80.SRL_D;
     3459begin
     3460  NotImplemented;
     3461end;
     3462
     3463procedure TCpuZ80.SRL_E;
     3464begin
     3465  NotImplemented;
     3466end;
     3467
     3468procedure TCpuZ80.SRL_H;
     3469begin
     3470  NotImplemented;
     3471end;
     3472
     3473procedure TCpuZ80.SRL_L;
     3474begin
     3475  NotImplemented;
     3476end;
     3477
     3478procedure TCpuZ80.SRL_HL_Indirect;
     3479begin
     3480  NotImplemented;
     3481end;
     3482
     3483procedure TCpuZ80.SRL_A;
     3484begin
     3485  NotImplemented;
     3486end;
     3487
     3488procedure TCpuZ80.BIT_0_B;
     3489begin
     3490  NotImplemented;
     3491end;
     3492
     3493procedure TCpuZ80.BIT_0_C;
     3494begin
     3495  NotImplemented;
     3496end;
     3497
     3498procedure TCpuZ80.BIT_0_D;
     3499begin
     3500  NotImplemented;
     3501end;
     3502
     3503procedure TCpuZ80.BIT_0_E;
     3504begin
     3505  NotImplemented;
     3506end;
     3507
     3508procedure TCpuZ80.BIT_0_H;
     3509begin
     3510  NotImplemented;
     3511end;
     3512
     3513procedure TCpuZ80.BIT_0_L;
     3514begin
     3515  NotImplemented;
     3516end;
     3517
     3518procedure TCpuZ80.BIT_0_HL_Indirect;
     3519begin
     3520  NotImplemented;
     3521end;
     3522
     3523procedure TCpuZ80.BIT_0_A;
     3524begin
     3525  NotImplemented;
     3526end;
     3527
     3528procedure TCpuZ80.BIT_1_B;
     3529begin
     3530  NotImplemented;
     3531end;
     3532
     3533procedure TCpuZ80.BIT_1_C;
     3534begin
     3535  NotImplemented;
     3536end;
     3537
     3538procedure TCpuZ80.BIT_1_D;
     3539begin
     3540  NotImplemented;
     3541end;
     3542
     3543procedure TCpuZ80.BIT_1_E;
     3544begin
     3545  NotImplemented;
     3546end;
     3547
     3548procedure TCpuZ80.BIT_1_H;
     3549begin
     3550  NotImplemented;
     3551end;
     3552
     3553procedure TCpuZ80.BIT_1_L;
     3554begin
     3555  NotImplemented;
     3556end;
     3557
     3558procedure TCpuZ80.BIT_1_HL_Indirect;
     3559begin
     3560  NotImplemented;
     3561end;
     3562
     3563procedure TCpuZ80.BIT_1_A;
     3564begin
     3565  NotImplemented;
     3566end;
     3567
     3568procedure TCpuZ80.BIT_2_B;
     3569begin
     3570  NotImplemented;
     3571end;
     3572
     3573procedure TCpuZ80.BIT_2_C;
     3574begin
     3575  NotImplemented;
     3576end;
     3577
     3578procedure TCpuZ80.BIT_2_D;
     3579begin
     3580  NotImplemented;
     3581end;
     3582
     3583procedure TCpuZ80.BIT_2_E;
     3584begin
     3585  NotImplemented;
     3586end;
     3587
     3588procedure TCpuZ80.BIT_2_H;
     3589begin
     3590  NotImplemented;
     3591end;
     3592
     3593procedure TCpuZ80.BIT_2_L;
     3594begin
     3595  NotImplemented;
     3596end;
     3597
     3598procedure TCpuZ80.BIT_2_HL_Indirect;
     3599begin
     3600  NotImplemented;
     3601end;
     3602
     3603procedure TCpuZ80.BIT_2_A;
     3604begin
     3605  NotImplemented;
     3606end;
     3607
     3608procedure TCpuZ80.BIT_3_B;
     3609begin
     3610  NotImplemented;
     3611end;
     3612
     3613procedure TCpuZ80.BIT_3_C;
     3614begin
     3615  NotImplemented;
     3616end;
     3617
     3618procedure TCpuZ80.BIT_3_D;
     3619begin
     3620  NotImplemented;
     3621end;
     3622
     3623procedure TCpuZ80.BIT_3_E;
     3624begin
     3625  NotImplemented;
     3626end;
     3627
     3628procedure TCpuZ80.BIT_3_H;
     3629begin
     3630  NotImplemented;
     3631end;
     3632
     3633procedure TCpuZ80.BIT_3_L;
     3634begin
     3635  NotImplemented;
     3636end;
     3637
     3638procedure TCpuZ80.BIT_3_HL_Indirect;
     3639begin
     3640  NotImplemented;
     3641end;
     3642
     3643procedure TCpuZ80.BIT_3_A;
     3644begin
     3645  NotImplemented;
     3646end;
     3647
     3648procedure TCpuZ80.BIT_4_B;
     3649begin
     3650  NotImplemented;
     3651end;
     3652
     3653procedure TCpuZ80.BIT_4_C;
     3654begin
     3655  NotImplemented;
     3656end;
     3657
     3658procedure TCpuZ80.BIT_4_D;
     3659begin
     3660  NotImplemented;
     3661end;
     3662
     3663procedure TCpuZ80.BIT_4_E;
     3664begin
     3665  NotImplemented;
     3666end;
     3667
     3668procedure TCpuZ80.BIT_4_H;
     3669begin
     3670  NotImplemented;
     3671end;
     3672
     3673procedure TCpuZ80.BIT_4_L;
     3674begin
     3675  NotImplemented;
     3676end;
     3677
     3678procedure TCpuZ80.BIT_4_HL_Indirect;
     3679begin
     3680  NotImplemented;
     3681end;
     3682
     3683procedure TCpuZ80.BIT_4_A;
     3684begin
     3685  NotImplemented;
     3686end;
     3687
     3688procedure TCpuZ80.BIT_5_B;
     3689begin
     3690  NotImplemented;
     3691end;
     3692
     3693procedure TCpuZ80.BIT_5_C;
     3694begin
     3695  NotImplemented;
     3696end;
     3697
     3698procedure TCpuZ80.BIT_5_D;
     3699begin
     3700  NotImplemented;
     3701end;
     3702
     3703procedure TCpuZ80.BIT_5_E;
     3704begin
     3705  NotImplemented;
     3706end;
     3707
     3708procedure TCpuZ80.BIT_5_H;
     3709begin
     3710  NotImplemented;
     3711end;
     3712
     3713procedure TCpuZ80.BIT_5_L;
     3714begin
     3715  NotImplemented;
     3716end;
     3717
     3718procedure TCpuZ80.BIT_5_HL_Indirect;
     3719begin
     3720  NotImplemented;
     3721end;
     3722
     3723procedure TCpuZ80.BIT_5_A;
     3724begin
     3725  NotImplemented;
     3726end;
     3727
     3728procedure TCpuZ80.BIT_6_B;
     3729begin
     3730  NotImplemented;
     3731end;
     3732
     3733procedure TCpuZ80.BIT_6_C;
     3734begin
     3735  NotImplemented;
     3736end;
     3737
     3738procedure TCpuZ80.BIT_6_D;
     3739begin
     3740  NotImplemented;
     3741end;
     3742
     3743procedure TCpuZ80.BIT_6_E;
     3744begin
     3745  NotImplemented;
     3746end;
     3747
     3748procedure TCpuZ80.BIT_6_H;
     3749begin
     3750  NotImplemented;
     3751end;
     3752
     3753procedure TCpuZ80.BIT_6_L;
     3754begin
     3755  NotImplemented;
     3756end;
     3757
     3758procedure TCpuZ80.BIT_6_HL_Indirect;
     3759begin
     3760  NotImplemented;
     3761end;
     3762
     3763procedure TCpuZ80.BIT_6_A;
     3764begin
     3765  NotImplemented;
     3766end;
     3767
     3768procedure TCpuZ80.BIT_7_B;
     3769begin
     3770  NotImplemented;
     3771end;
     3772
     3773procedure TCpuZ80.BIT_7_C;
     3774begin
     3775  NotImplemented;
     3776end;
     3777
     3778procedure TCpuZ80.BIT_7_D;
     3779begin
     3780  NotImplemented;
     3781end;
     3782
     3783procedure TCpuZ80.BIT_7_E;
     3784begin
     3785  NotImplemented;
     3786end;
     3787
     3788procedure TCpuZ80.BIT_7_H;
     3789begin
     3790  NotImplemented;
     3791end;
     3792
     3793procedure TCpuZ80.BIT_7_L;
     3794begin
     3795  NotImplemented;
     3796end;
     3797
     3798procedure TCpuZ80.BIT_7_HL_Indirect;
     3799begin
     3800  NotImplemented;
     3801end;
     3802
     3803procedure TCpuZ80.BIT_7_A;
     3804begin
     3805  NotImplemented;
     3806end;
     3807
     3808procedure TCpuZ80.RES_0_B;
     3809begin
     3810  NotImplemented;
     3811end;
     3812
     3813procedure TCpuZ80.RES_0_C;
     3814begin
     3815  NotImplemented;
     3816end;
     3817
     3818procedure TCpuZ80.RES_0_D;
     3819begin
     3820  NotImplemented;
     3821end;
     3822
     3823procedure TCpuZ80.RES_0_E;
     3824begin
     3825  NotImplemented;
     3826end;
     3827
     3828procedure TCpuZ80.RES_0_H;
     3829begin
     3830  NotImplemented;
     3831end;
     3832
     3833procedure TCpuZ80.RES_0_L;
     3834begin
     3835  NotImplemented;
     3836end;
     3837
     3838procedure TCpuZ80.RES_0_HL_Indirect;
     3839begin
     3840  NotImplemented;
     3841end;
     3842
     3843procedure TCpuZ80.RES_0_A;
     3844begin
     3845  NotImplemented;
     3846end;
     3847
     3848procedure TCpuZ80.RES_1_B;
     3849begin
     3850  NotImplemented;
     3851end;
     3852
     3853procedure TCpuZ80.RES_1_C;
     3854begin
     3855  NotImplemented;
     3856end;
     3857
     3858procedure TCpuZ80.RES_1_D;
     3859begin
     3860  NotImplemented;
     3861end;
     3862
     3863procedure TCpuZ80.RES_1_E;
     3864begin
     3865  NotImplemented;
     3866end;
     3867
     3868procedure TCpuZ80.RES_1_H;
     3869begin
     3870  NotImplemented;
     3871end;
     3872
     3873procedure TCpuZ80.RES_1_L;
     3874begin
     3875  NotImplemented;
     3876end;
     3877
     3878procedure TCpuZ80.RES_1_HL_Indirect;
     3879begin
     3880  NotImplemented;
     3881end;
     3882
     3883procedure TCpuZ80.RES_1_A;
     3884begin
     3885  NotImplemented;
     3886end;
     3887
     3888procedure TCpuZ80.RES_2_B;
     3889begin
     3890  NotImplemented;
     3891end;
     3892
     3893procedure TCpuZ80.RES_2_C;
     3894begin
     3895  NotImplemented;
     3896end;
     3897
     3898procedure TCpuZ80.RES_2_D;
     3899begin
     3900  NotImplemented;
     3901end;
     3902
     3903procedure TCpuZ80.RES_2_E;
     3904begin
     3905  NotImplemented;
     3906end;
     3907
     3908procedure TCpuZ80.RES_2_H;
     3909begin
     3910  NotImplemented;
     3911end;
     3912
     3913procedure TCpuZ80.RES_2_L;
     3914begin
     3915  NotImplemented;
     3916end;
     3917
     3918procedure TCpuZ80.RES_2_HL_Indirect;
     3919begin
     3920  NotImplemented;
     3921end;
     3922
     3923procedure TCpuZ80.RES_2_A;
     3924begin
     3925  NotImplemented;
     3926end;
     3927
     3928procedure TCpuZ80.RES_3_B;
     3929begin
     3930  NotImplemented;
     3931end;
     3932
     3933procedure TCpuZ80.RES_3_C;
     3934begin
     3935  NotImplemented;
     3936end;
     3937
     3938procedure TCpuZ80.RES_3_D;
     3939begin
     3940  NotImplemented;
     3941end;
     3942
     3943procedure TCpuZ80.RES_3_E;
     3944begin
     3945  NotImplemented;
     3946end;
     3947
     3948procedure TCpuZ80.RES_3_H;
     3949begin
     3950  NotImplemented;
     3951end;
     3952
     3953procedure TCpuZ80.RES_3_L;
     3954begin
     3955  NotImplemented;
     3956end;
     3957
     3958procedure TCpuZ80.RES_3_HL_Indirect;
     3959begin
     3960  NotImplemented;
     3961end;
     3962
     3963procedure TCpuZ80.RES_3_A;
     3964begin
     3965  NotImplemented;
     3966end;
     3967
     3968procedure TCpuZ80.RES_4_B;
     3969begin
     3970  NotImplemented;
     3971end;
     3972
     3973procedure TCpuZ80.RES_4_C;
     3974begin
     3975  NotImplemented;
     3976end;
     3977
     3978procedure TCpuZ80.RES_4_D;
     3979begin
     3980  NotImplemented;
     3981end;
     3982
     3983procedure TCpuZ80.RES_4_E;
     3984begin
     3985  NotImplemented;
     3986end;
     3987
     3988procedure TCpuZ80.RES_4_H;
     3989begin
     3990  NotImplemented;
     3991end;
     3992
     3993procedure TCpuZ80.RES_4_L;
     3994begin
     3995  NotImplemented;
     3996end;
     3997
     3998procedure TCpuZ80.RES_4_HL_Indirect;
     3999begin
     4000  NotImplemented;
     4001end;
     4002
     4003procedure TCpuZ80.RES_4_A;
     4004begin
     4005  NotImplemented;
     4006end;
     4007
     4008procedure TCpuZ80.RES_5_B;
     4009begin
     4010  NotImplemented;
     4011end;
     4012
     4013procedure TCpuZ80.RES_5_C;
     4014begin
     4015  NotImplemented;
     4016end;
     4017
     4018procedure TCpuZ80.RES_5_D;
     4019begin
     4020  NotImplemented;
     4021end;
     4022
     4023procedure TCpuZ80.RES_5_E;
     4024begin
     4025  NotImplemented;
     4026end;
     4027
     4028procedure TCpuZ80.RES_5_H;
     4029begin
     4030  NotImplemented;
     4031end;
     4032
     4033procedure TCpuZ80.RES_5_L;
     4034begin
     4035  NotImplemented;
     4036end;
     4037
     4038procedure TCpuZ80.RES_5_HL_Indirect;
     4039begin
     4040  NotImplemented;
     4041end;
     4042
     4043procedure TCpuZ80.RES_5_A;
     4044begin
     4045  NotImplemented;
     4046end;
     4047
     4048procedure TCpuZ80.RES_6_B;
     4049begin
     4050  NotImplemented;
     4051end;
     4052
     4053procedure TCpuZ80.RES_6_C;
     4054begin
     4055  NotImplemented;
     4056end;
     4057
     4058procedure TCpuZ80.RES_6_D;
     4059begin
     4060  NotImplemented;
     4061end;
     4062
     4063procedure TCpuZ80.RES_6_E;
     4064begin
     4065  NotImplemented;
     4066end;
     4067
     4068procedure TCpuZ80.RES_6_H;
     4069begin
     4070  NotImplemented;
     4071end;
     4072
     4073procedure TCpuZ80.RES_6_L;
     4074begin
     4075  NotImplemented;
     4076end;
     4077
     4078procedure TCpuZ80.RES_6_HL_Indirect;
     4079begin
     4080  NotImplemented;
     4081end;
     4082
     4083procedure TCpuZ80.RES_6_A;
     4084begin
     4085  NotImplemented;
     4086end;
     4087
     4088procedure TCpuZ80.RES_7_B;
     4089begin
     4090  NotImplemented;
     4091end;
     4092
     4093procedure TCpuZ80.RES_7_C;
     4094begin
     4095  NotImplemented;
     4096end;
     4097
     4098procedure TCpuZ80.RES_7_D;
     4099begin
     4100  NotImplemented;
     4101end;
     4102
     4103procedure TCpuZ80.RES_7_E;
     4104begin
     4105  NotImplemented;
     4106end;
     4107
     4108procedure TCpuZ80.RES_7_H;
     4109begin
     4110  NotImplemented;
     4111end;
     4112
     4113procedure TCpuZ80.RES_7_L;
     4114begin
     4115  NotImplemented;
     4116end;
     4117
     4118procedure TCpuZ80.RES_7_HL_Indirect;
     4119begin
     4120  NotImplemented;
     4121end;
     4122
     4123procedure TCpuZ80.RES_7_A;
     4124begin
     4125  NotImplemented;
     4126end;
     4127
     4128procedure TCpuZ80.SET_0_B;
     4129begin
     4130  NotImplemented;
     4131end;
     4132
     4133procedure TCpuZ80.SET_0_C;
     4134begin
     4135  NotImplemented;
     4136end;
     4137
     4138procedure TCpuZ80.SET_0_D;
     4139begin
     4140  NotImplemented;
     4141end;
     4142
     4143procedure TCpuZ80.SET_0_E;
     4144begin
     4145  NotImplemented;
     4146end;
     4147
     4148procedure TCpuZ80.SET_0_H;
     4149begin
     4150  NotImplemented;
     4151end;
     4152
     4153procedure TCpuZ80.SET_0_L;
     4154begin
     4155  NotImplemented;
     4156end;
     4157
     4158procedure TCpuZ80.SET_0_HL_Indirect;
     4159begin
     4160  NotImplemented;
     4161end;
     4162
     4163procedure TCpuZ80.SET_0_A;
     4164begin
     4165  NotImplemented;
     4166end;
     4167
     4168procedure TCpuZ80.SET_1_B;
     4169begin
     4170  NotImplemented;
     4171end;
     4172
     4173procedure TCpuZ80.SET_1_C;
     4174begin
     4175  NotImplemented;
     4176end;
     4177
     4178procedure TCpuZ80.SET_1_D;
     4179begin
     4180  NotImplemented;
     4181end;
     4182
     4183procedure TCpuZ80.SET_1_E;
     4184begin
     4185  NotImplemented;
     4186end;
     4187
     4188procedure TCpuZ80.SET_1_H;
     4189begin
     4190  NotImplemented;
     4191end;
     4192
     4193procedure TCpuZ80.SET_1_L;
     4194begin
     4195  NotImplemented;
     4196end;
     4197
     4198procedure TCpuZ80.SET_1_HL_Indirect;
     4199begin
     4200  NotImplemented;
     4201end;
     4202
     4203procedure TCpuZ80.SET_1_A;
     4204begin
     4205  NotImplemented;
     4206end;
     4207
     4208procedure TCpuZ80.SET_2_B;
     4209begin
     4210  NotImplemented;
     4211end;
     4212
     4213procedure TCpuZ80.SET_2_C;
     4214begin
     4215  NotImplemented;
     4216end;
     4217
     4218procedure TCpuZ80.SET_2_D;
     4219begin
     4220  NotImplemented;
     4221end;
     4222
     4223procedure TCpuZ80.SET_2_E;
     4224begin
     4225  NotImplemented;
     4226end;
     4227
     4228procedure TCpuZ80.SET_2_H;
     4229begin
     4230  NotImplemented;
     4231end;
     4232
     4233procedure TCpuZ80.SET_2_L;
     4234begin
     4235  NotImplemented;
     4236end;
     4237
     4238procedure TCpuZ80.SET_2_HL_Indirect;
     4239begin
     4240  NotImplemented;
     4241end;
     4242
     4243procedure TCpuZ80.SET_2_A;
     4244begin
     4245  NotImplemented;
     4246end;
     4247
     4248procedure TCpuZ80.SET_3_B;
     4249begin
     4250  NotImplemented;
     4251end;
     4252
     4253procedure TCpuZ80.SET_3_C;
     4254begin
     4255  NotImplemented;
     4256end;
     4257
     4258procedure TCpuZ80.SET_3_D;
     4259begin
     4260  NotImplemented;
     4261end;
     4262
     4263procedure TCpuZ80.SET_3_E;
     4264begin
     4265  NotImplemented;
     4266end;
     4267
     4268procedure TCpuZ80.SET_3_H;
     4269begin
     4270  NotImplemented;
     4271end;
     4272
     4273procedure TCpuZ80.SET_3_L;
     4274begin
     4275  NotImplemented;
     4276end;
     4277
     4278procedure TCpuZ80.SET_3_HL_Indirect;
     4279begin
     4280  NotImplemented;
     4281end;
     4282
     4283procedure TCpuZ80.SET_3_A;
     4284begin
     4285  NotImplemented;
     4286end;
     4287
     4288procedure TCpuZ80.SET_4_B;
     4289begin
     4290  NotImplemented;
     4291end;
     4292
     4293procedure TCpuZ80.SET_4_C;
     4294begin
     4295  NotImplemented;
     4296end;
     4297
     4298procedure TCpuZ80.SET_4_D;
     4299begin
     4300  NotImplemented;
     4301end;
     4302
     4303procedure TCpuZ80.SET_4_E;
     4304begin
     4305  NotImplemented;
     4306end;
     4307
     4308procedure TCpuZ80.SET_4_H;
     4309begin
     4310  NotImplemented;
     4311end;
     4312
     4313procedure TCpuZ80.SET_4_L;
     4314begin
     4315  NotImplemented;
     4316end;
     4317
     4318procedure TCpuZ80.SET_4_HL_Indirect;
     4319begin
     4320  NotImplemented;
     4321end;
     4322
     4323procedure TCpuZ80.SET_4_A;
     4324begin
     4325  NotImplemented;
     4326end;
     4327
     4328procedure TCpuZ80.SET_5_B;
     4329begin
     4330  NotImplemented;
     4331end;
     4332
     4333procedure TCpuZ80.SET_5_C;
     4334begin
     4335  NotImplemented;
     4336end;
     4337
     4338procedure TCpuZ80.SET_5_D;
     4339begin
     4340  NotImplemented;
     4341end;
     4342
     4343procedure TCpuZ80.SET_5_E;
     4344begin
     4345  NotImplemented;
     4346end;
     4347
     4348procedure TCpuZ80.SET_5_H;
     4349begin
     4350  NotImplemented;
     4351end;
     4352
     4353procedure TCpuZ80.SET_5_L;
     4354begin
     4355  NotImplemented;
     4356end;
     4357
     4358procedure TCpuZ80.SET_5_HL_Indirect;
     4359begin
     4360  NotImplemented;
     4361end;
     4362
     4363procedure TCpuZ80.SET_5_A;
     4364begin
     4365  NotImplemented;
     4366end;
     4367
     4368procedure TCpuZ80.SET_6_B;
     4369begin
     4370  NotImplemented;
     4371end;
     4372
     4373procedure TCpuZ80.SET_6_C;
     4374begin
     4375  NotImplemented;
     4376end;
     4377
     4378procedure TCpuZ80.SET_6_D;
     4379begin
     4380  NotImplemented;
     4381end;
     4382
     4383procedure TCpuZ80.SET_6_E;
     4384begin
     4385  NotImplemented;
     4386end;
     4387
     4388procedure TCpuZ80.SET_6_H;
     4389begin
     4390  NotImplemented;
     4391end;
     4392
     4393procedure TCpuZ80.SET_6_L;
     4394begin
     4395  NotImplemented;
     4396end;
     4397
     4398procedure TCpuZ80.SET_6_HL_Indirect;
     4399begin
     4400  NotImplemented;
     4401end;
     4402
     4403procedure TCpuZ80.SET_6_A;
     4404begin
     4405  NotImplemented;
     4406end;
     4407
     4408procedure TCpuZ80.SET_7_B;
     4409begin
     4410  NotImplemented;
     4411end;
     4412
     4413procedure TCpuZ80.SET_7_C;
     4414begin
     4415  NotImplemented;
     4416end;
     4417
     4418procedure TCpuZ80.SET_7_D;
     4419begin
     4420  NotImplemented;
     4421end;
     4422
     4423procedure TCpuZ80.SET_7_E;
     4424begin
     4425  NotImplemented;
     4426end;
     4427
     4428procedure TCpuZ80.SET_7_H;
     4429begin
     4430  NotImplemented;
     4431end;
     4432
     4433procedure TCpuZ80.SET_7_L;
     4434begin
     4435  NotImplemented;
     4436end;
     4437
     4438procedure TCpuZ80.SET_7_HL_Indirect;
     4439begin
     4440  NotImplemented;
     4441end;
     4442
     4443procedure TCpuZ80.SET_7_A;
     4444begin
     4445  NotImplemented;
     4446end;
     4447
     4448procedure TCpuZ80.ADD_IX_BC;
     4449begin
     4450  NotImplemented;
     4451end;
     4452
     4453procedure TCpuZ80.ADD_IX_DE;
     4454begin
     4455  NotImplemented;
     4456end;
     4457
     4458procedure TCpuZ80.LD_IX_NN;
     4459begin
     4460  NotImplemented;
     4461end;
     4462
     4463procedure TCpuZ80.LD_NN_Indirect_IX;
     4464begin
     4465  NotImplemented;
     4466end;
     4467
     4468procedure TCpuZ80.INC_IX;
     4469begin
     4470  NotImplemented;
     4471end;
     4472
     4473procedure TCpuZ80.ADD_IX_IX;
     4474begin
     4475  NotImplemented;
     4476end;
     4477
     4478procedure TCpuZ80.LD_IX_NN_Indirect;
     4479begin
     4480  NotImplemented;
     4481end;
     4482
     4483procedure TCpuZ80.DEC_IX;
     4484begin
     4485  NotImplemented;
     4486end;
     4487
     4488procedure TCpuZ80.INC_IX_Plus_D_Indirect;
     4489begin
     4490  NotImplemented;
     4491end;
     4492
     4493procedure TCpuZ80.DEC_IX_Plus_D_Indirect;
     4494begin
     4495  NotImplemented;
     4496end;
     4497
     4498procedure TCpuZ80.LD_IX_Plus_D_Indirect_N;
     4499begin
     4500  NotImplemented;
     4501end;
     4502
     4503procedure TCpuZ80.ADD_IX_SP;
     4504begin
     4505  NotImplemented;
     4506end;
     4507
     4508procedure TCpuZ80.LD_B_IX_Plus_D_Indirect;
     4509begin
     4510  NotImplemented;
     4511end;
     4512
     4513procedure TCpuZ80.LD_C_IX_Plus_D_Indirect;
     4514begin
     4515  NotImplemented;
     4516end;
     4517
     4518procedure TCpuZ80.LD_D_IX_Plus_D_Indirect;
     4519begin
     4520  NotImplemented;
     4521end;
     4522
     4523procedure TCpuZ80.LD_E_IX_Plus_D_Indirect;
     4524begin
     4525  NotImplemented;
     4526end;
     4527
     4528procedure TCpuZ80.LD_H_IX_Plus_D_Indirect;
     4529begin
     4530  NotImplemented;
     4531end;
     4532
     4533procedure TCpuZ80.LD_L_IX_Plus_D_Indirect;
     4534begin
     4535  NotImplemented;
     4536end;
     4537
     4538procedure TCpuZ80.LD_IX_Plus_D_Indirect_B;
     4539begin
     4540  NotImplemented;
     4541end;
     4542
     4543procedure TCpuZ80.LD_IX_Plus_D_Indirect_C;
     4544begin
     4545  NotImplemented;
     4546end;
     4547
     4548procedure TCpuZ80.LD_IX_Plus_D_Indirect_D;
     4549begin
     4550  NotImplemented;
     4551end;
     4552
     4553procedure TCpuZ80.LD_IX_Plus_D_Indirect_E;
     4554begin
     4555  NotImplemented;
     4556end;
     4557
     4558procedure TCpuZ80.LD_IX_Plus_D_Indirect_H;
     4559begin
     4560  NotImplemented;
     4561end;
     4562
     4563procedure TCpuZ80.LD_IX_Plus_D_Indirect_L;
     4564begin
     4565  NotImplemented;
     4566end;
     4567
     4568procedure TCpuZ80.LD_IX_Plus_D_Indirect_A;
     4569begin
     4570  NotImplemented;
     4571end;
     4572
     4573procedure TCpuZ80.LD_A_IX_Plus_D_Indirect;
     4574begin
     4575  NotImplemented;
     4576end;
     4577
     4578procedure TCpuZ80.ADD_A_IX_Plus_D_Indirect;
     4579begin
     4580  NotImplemented;
     4581end;
     4582
     4583procedure TCpuZ80.ADC_A_IX_Plus_D_Indirect;
     4584begin
     4585  NotImplemented;
     4586end;
     4587
     4588procedure TCpuZ80.SUB_IX_Plus_D_Indirect;
     4589begin
     4590  NotImplemented;
     4591end;
     4592
     4593procedure TCpuZ80.SBC_A_IX_Plus_D_Indirect;
     4594begin
     4595  NotImplemented;
     4596end;
     4597
     4598procedure TCpuZ80.AND_IX_Plus_D_Indirect;
     4599begin
     4600  NotImplemented;
     4601end;
     4602
     4603procedure TCpuZ80.XOR_IX_Plus_D_Indirect;
     4604begin
     4605  NotImplemented;
     4606end;
     4607
     4608procedure TCpuZ80.OR_IX_Plus_D_Indirect;
     4609begin
     4610  NotImplemented;
     4611end;
     4612
     4613procedure TCpuZ80.CP_IX_Plus_D_Indirect;
     4614begin
     4615  NotImplemented;
     4616end;
     4617
     4618procedure TCpuZ80.POP_IX;
     4619begin
     4620  NotImplemented;
     4621end;
     4622
     4623procedure TCpuZ80.EX_SP_Indirect_IX;
     4624begin
     4625  NotImplemented;
     4626end;
     4627
     4628procedure TCpuZ80.PUSH_IX;
     4629begin
     4630  NotImplemented;
     4631end;
     4632
     4633procedure TCpuZ80.JP_IX_Indirect;
     4634begin
     4635  NotImplemented;
     4636end;
     4637
     4638procedure TCpuZ80.LD_SP_IX;
     4639begin
     4640  NotImplemented;
     4641end;
     4642
     4643procedure TCpuZ80.RLC_IX_Plus_D_Indirect;
     4644begin
     4645  NotImplemented;
     4646end;
     4647
     4648procedure TCpuZ80.RRC_IX_Plus_D_Indirect;
     4649begin
     4650  NotImplemented;
     4651end;
     4652
     4653procedure TCpuZ80.RL_IX_Plus_D_Indirect;
     4654begin
     4655  NotImplemented;
     4656end;
     4657
     4658procedure TCpuZ80.RR_IX_Plus_D_Indirect;
     4659begin
     4660  NotImplemented;
     4661end;
     4662
     4663procedure TCpuZ80.SLA_IX_Plus_D_Indirect;
     4664begin
     4665  NotImplemented;
     4666end;
     4667
     4668procedure TCpuZ80.SRA_IX_Plus_D_Indirect;
     4669begin
     4670  NotImplemented;
     4671end;
     4672
     4673procedure TCpuZ80.SRL_IX_Plus_D_Indirect;
     4674begin
     4675  NotImplemented;
     4676end;
     4677
     4678procedure TCpuZ80.BIT_0_IX_Plus_D_Indirect;
     4679begin
     4680  NotImplemented;
     4681end;
     4682
     4683procedure TCpuZ80.BIT_1_IX_Plus_D_Indirect;
     4684begin
     4685  NotImplemented;
     4686end;
     4687
     4688procedure TCpuZ80.BIT_2_IX_Plus_D_Indirect;
     4689begin
     4690  NotImplemented;
     4691end;
     4692
     4693procedure TCpuZ80.BIT_3_IX_Plus_D_Indirect;
     4694begin
     4695  NotImplemented;
     4696end;
     4697
     4698procedure TCpuZ80.BIT_4_IX_Plus_D_Indirect;
     4699begin
     4700  NotImplemented;
     4701end;
     4702
     4703procedure TCpuZ80.BIT_5_IX_Plus_D_Indirect;
     4704begin
     4705  NotImplemented;
     4706end;
     4707
     4708procedure TCpuZ80.BIT_6_IX_Plus_D_Indirect;
     4709begin
     4710  NotImplemented;
     4711end;
     4712
     4713procedure TCpuZ80.BIT_7_IX_Plus_D_Indirect;
     4714begin
     4715  NotImplemented;
     4716end;
     4717
     4718procedure TCpuZ80.RES_0_IX_Plus_D_Indirect;
     4719begin
     4720  NotImplemented;
     4721end;
     4722
     4723procedure TCpuZ80.RES_1_IX_Plus_D_Indirect;
     4724begin
     4725  NotImplemented;
     4726end;
     4727
     4728procedure TCpuZ80.RES_2_IX_Plus_D_Indirect;
     4729begin
     4730  NotImplemented;
     4731end;
     4732
     4733procedure TCpuZ80.RES_3_IX_Plus_D_Indirect;
     4734begin
     4735  NotImplemented;
     4736end;
     4737
     4738procedure TCpuZ80.RES_4_IX_Plus_D_Indirect;
     4739begin
     4740  NotImplemented;
     4741end;
     4742
     4743procedure TCpuZ80.RES_5_IX_Plus_D_Indirect;
     4744begin
     4745  NotImplemented;
     4746end;
     4747
     4748procedure TCpuZ80.RES_6_IX_Plus_D_Indirect;
     4749begin
     4750  NotImplemented;
     4751end;
     4752
     4753procedure TCpuZ80.RES_7_IX_Plus_D_Indirect;
     4754begin
     4755  NotImplemented;
     4756end;
     4757
     4758procedure TCpuZ80.SET_0_IX_Plus_D_Indirect;
     4759begin
     4760  NotImplemented;
     4761end;
     4762
     4763procedure TCpuZ80.SET_1_IX_Plus_D_Indirect;
     4764begin
     4765  NotImplemented;
     4766end;
     4767
     4768procedure TCpuZ80.SET_2_IX_Plus_D_Indirect;
     4769begin
     4770  NotImplemented;
     4771end;
     4772
     4773procedure TCpuZ80.SET_3_IX_Plus_D_Indirect;
     4774begin
     4775  NotImplemented;
     4776end;
     4777
     4778procedure TCpuZ80.SET_4_IX_Plus_D_Indirect;
     4779begin
     4780  NotImplemented;
     4781end;
     4782
     4783procedure TCpuZ80.SET_5_IX_Plus_D_Indirect;
     4784begin
     4785  NotImplemented;
     4786end;
     4787
     4788procedure TCpuZ80.SET_6_IX_Plus_D_Indirect;
     4789begin
     4790  NotImplemented;
     4791end;
     4792
     4793procedure TCpuZ80.SET_7_IX_Plus_D_Indirect;
     4794begin
     4795  NotImplemented;
     4796end;
     4797
     4798procedure TCpuZ80.ADD_IY_BC;
     4799begin
     4800  NotImplemented;
     4801end;
     4802
     4803procedure TCpuZ80.ADD_IY_DE;
     4804begin
     4805  NotImplemented;
     4806end;
     4807
     4808procedure TCpuZ80.LD_IY_NN;
     4809begin
     4810  NotImplemented;
     4811end;
     4812
     4813procedure TCpuZ80.LD_NN_Indirect_IY;
     4814begin
     4815  NotImplemented;
     4816end;
     4817
     4818procedure TCpuZ80.INC_IY;
     4819begin
     4820  NotImplemented;
     4821end;
     4822
     4823procedure TCpuZ80.ADD_IY_IY;
     4824begin
     4825  NotImplemented;
     4826end;
     4827
     4828procedure TCpuZ80.LD_IY_NN_Indirect;
     4829begin
     4830  NotImplemented;
     4831end;
     4832
     4833procedure TCpuZ80.DEC_IY;
     4834begin
     4835  NotImplemented;
     4836end;
     4837
     4838procedure TCpuZ80.INC_IY_Plus_D_Indirect;
     4839begin
     4840  NotImplemented;
     4841end;
     4842
     4843procedure TCpuZ80.DEC_IY_Plus_D_Indirect;
     4844begin
     4845  NotImplemented;
     4846end;
     4847
     4848procedure TCpuZ80.LD_IY_Plus_D_Indirect_N;
     4849begin
     4850  NotImplemented;
     4851end;
     4852
     4853procedure TCpuZ80.ADD_IY_SP;
     4854begin
     4855  NotImplemented;
     4856end;
     4857
     4858procedure TCpuZ80.LD_B_IY_Plus_D_Indirect;
     4859begin
     4860  NotImplemented;
     4861end;
     4862
     4863procedure TCpuZ80.LD_C_IY_Plus_D_Indirect;
     4864begin
     4865  NotImplemented;
     4866end;
     4867
     4868procedure TCpuZ80.LD_D_IY_Plus_D_Indirect;
     4869begin
     4870  NotImplemented;
     4871end;
     4872
     4873procedure TCpuZ80.LD_E_IY_Plus_D_Indirect;
     4874begin
     4875  NotImplemented;
     4876end;
     4877
     4878procedure TCpuZ80.LD_H_IY_Plus_D_Indirect;
     4879begin
     4880  NotImplemented;
     4881end;
     4882
     4883procedure TCpuZ80.LD_L_IY_Plus_D_Indirect;
     4884begin
     4885  NotImplemented;
     4886end;
     4887
     4888procedure TCpuZ80.LD_IY_Plus_D_Indirect_B;
     4889begin
     4890  NotImplemented;
     4891end;
     4892
     4893procedure TCpuZ80.LD_IY_Plus_D_Indirect_C;
     4894begin
     4895  NotImplemented;
     4896end;
     4897
     4898procedure TCpuZ80.LD_IY_Plus_D_Indirect_D;
     4899begin
     4900  NotImplemented;
     4901end;
     4902
     4903procedure TCpuZ80.LD_IY_Plus_D_Indirect_E;
     4904begin
     4905  NotImplemented;
     4906end;
     4907
     4908procedure TCpuZ80.LD_IY_Plus_D_Indirect_H;
     4909begin
     4910  NotImplemented;
     4911end;
     4912
     4913procedure TCpuZ80.LD_IY_Plus_D_Indirect_L;
     4914begin
     4915  NotImplemented;
     4916end;
     4917
     4918procedure TCpuZ80.LD_IY_Plus_D_Indirect_A;
     4919begin
     4920  NotImplemented;
     4921end;
     4922
     4923procedure TCpuZ80.LD_A_IY_Plus_D_Indirect;
     4924begin
     4925  NotImplemented;
     4926end;
     4927
     4928procedure TCpuZ80.ADD_A_IY_Plus_D_Indirect;
     4929begin
     4930  NotImplemented;
     4931end;
     4932
     4933procedure TCpuZ80.ADC_A_IY_Plus_D_Indirect;
     4934begin
     4935  NotImplemented;
     4936end;
     4937
     4938procedure TCpuZ80.SUB_IY_Plus_D_Indirect;
     4939begin
     4940  NotImplemented;
     4941end;
     4942
     4943procedure TCpuZ80.SBC_A_IY_Plus_D_Indirect;
     4944begin
     4945  NotImplemented;
     4946end;
     4947
     4948procedure TCpuZ80.AND_IY_Plus_D_Indirect;
     4949begin
     4950  NotImplemented;
     4951end;
     4952
     4953procedure TCpuZ80.XOR_IY_Plus_D_Indirect;
     4954begin
     4955  NotImplemented;
     4956end;
     4957
     4958procedure TCpuZ80.OR_IY_Plus_D_Indirect;
     4959begin
     4960  NotImplemented;
     4961end;
     4962
     4963procedure TCpuZ80.CP_IY_Plus_D_Indirect;
     4964begin
     4965  NotImplemented;
     4966end;
     4967
     4968procedure TCpuZ80.POP_IY;
     4969begin
     4970  NotImplemented;
     4971end;
     4972
     4973procedure TCpuZ80.EX_SP_Indirect_IY;
     4974begin
     4975  NotImplemented;
     4976end;
     4977
     4978procedure TCpuZ80.PUSH_IY;
     4979begin
     4980  NotImplemented;
     4981end;
     4982
     4983procedure TCpuZ80.JP_IY_Indirect;
     4984begin
     4985  NotImplemented;
     4986end;
     4987
     4988procedure TCpuZ80.LD_SP_IY;
     4989begin
     4990  NotImplemented;
     4991end;
     4992
     4993procedure TCpuZ80.RLC_IY_Plus_D_Indirect;
     4994begin
     4995  NotImplemented;
     4996end;
     4997
     4998procedure TCpuZ80.RRC_IY_Plus_D_Indirect;
     4999begin
     5000  NotImplemented;
     5001end;
     5002
     5003procedure TCpuZ80.RL_IY_Plus_D_Indirect;
     5004begin
     5005  NotImplemented;
     5006end;
     5007
     5008procedure TCpuZ80.RR_IY_Plus_D_Indirect;
     5009begin
     5010  NotImplemented;
     5011end;
     5012
     5013procedure TCpuZ80.SLA_IY_Plus_D_Indirect;
     5014begin
     5015  NotImplemented;
     5016end;
     5017
     5018procedure TCpuZ80.SRA_IY_Plus_D_Indirect;
     5019begin
     5020  NotImplemented;
     5021end;
     5022
     5023procedure TCpuZ80.SRL_IY_Plus_D_Indirect;
     5024begin
     5025  NotImplemented;
     5026end;
     5027
     5028procedure TCpuZ80.BIT_0_IY_Plus_D_Indirect;
     5029begin
     5030  NotImplemented;
     5031end;
     5032
     5033procedure TCpuZ80.BIT_1_IY_Plus_D_Indirect;
     5034begin
     5035  NotImplemented;
     5036end;
     5037
     5038procedure TCpuZ80.BIT_2_IY_Plus_D_Indirect;
     5039begin
     5040  NotImplemented;
     5041end;
     5042
     5043procedure TCpuZ80.BIT_3_IY_Plus_D_Indirect;
     5044begin
     5045  NotImplemented;
     5046end;
     5047
     5048procedure TCpuZ80.BIT_4_IY_Plus_D_Indirect;
     5049begin
     5050  NotImplemented;
     5051end;
     5052
     5053procedure TCpuZ80.BIT_5_IY_Plus_D_Indirect;
     5054begin
     5055  NotImplemented;
     5056end;
     5057
     5058procedure TCpuZ80.BIT_6_IY_Plus_D_Indirect;
     5059begin
     5060  NotImplemented;
     5061end;
     5062
     5063procedure TCpuZ80.BIT_7_IY_Plus_D_Indirect;
     5064begin
     5065  NotImplemented;
     5066end;
     5067
     5068procedure TCpuZ80.RES_0_IY_Plus_D_Indirect;
     5069begin
     5070  NotImplemented;
     5071end;
     5072
     5073procedure TCpuZ80.RES_1_IY_Plus_D_Indirect;
     5074begin
     5075  NotImplemented;
     5076end;
     5077
     5078procedure TCpuZ80.RES_2_IY_Plus_D_Indirect;
     5079begin
     5080  NotImplemented;
     5081end;
     5082
     5083procedure TCpuZ80.RES_3_IY_Plus_D_Indirect;
     5084begin
     5085  NotImplemented;
     5086end;
     5087
     5088procedure TCpuZ80.RES_4_IY_Plus_D_Indirect;
     5089begin
     5090  NotImplemented;
     5091end;
     5092
     5093procedure TCpuZ80.RES_5_IY_Plus_D_Indirect;
     5094begin
     5095  NotImplemented;
     5096end;
     5097
     5098procedure TCpuZ80.RES_6_IY_Plus_D_Indirect;
     5099begin
     5100  NotImplemented;
     5101end;
     5102
     5103procedure TCpuZ80.RES_7_IY_Plus_D_Indirect;
     5104begin
     5105  NotImplemented;
     5106end;
     5107
     5108procedure TCpuZ80.SET_0_IY_Plus_D_Indirect;
     5109begin
     5110  NotImplemented;
     5111end;
     5112
     5113procedure TCpuZ80.SET_1_IY_Plus_D_Indirect;
     5114begin
     5115  NotImplemented;
     5116end;
     5117
     5118procedure TCpuZ80.SET_2_IY_Plus_D_Indirect;
     5119begin
     5120  NotImplemented;
     5121end;
     5122
     5123procedure TCpuZ80.SET_3_IY_Plus_D_Indirect;
     5124begin
     5125  NotImplemented;
     5126end;
     5127
     5128procedure TCpuZ80.SET_4_IY_Plus_D_Indirect;
     5129begin
     5130  NotImplemented;
     5131end;
     5132
     5133procedure TCpuZ80.SET_5_IY_Plus_D_Indirect;
     5134begin
     5135  NotImplemented;
     5136end;
     5137
     5138procedure TCpuZ80.SET_6_IY_Plus_D_Indirect;
     5139begin
     5140  NotImplemented;
     5141end;
     5142
     5143procedure TCpuZ80.SET_7_IY_Plus_D_Indirect;
     5144begin
     5145  NotImplemented;
    4365146end;
    4375147
     
    4425152begin
    4435153  Opcode := ReadByte;
    444   if Opcode = Byte(inPrefixCb) then begin
    445     Instruction := TInstruction($100 or Opcode);
     5154  if Opcode = $CB then begin
     5155    Instruction := TInstruction($100 or ReadByte);
    4465156  end
    447   else if Opcode = Byte(inPrefixDd) then begin
    448     Instruction := TInstruction($200 or Opcode);
     5157  else if Opcode = $DD then begin
     5158    Instruction := TInstruction($200 or ReadByte);
    4495159  end
    450   else if Opcode = Byte(inPrefixEd) then begin
    451     Instruction := TInstruction($300 or Opcode);
     5160  else if Opcode = $ED then begin
     5161    Instruction := TInstruction($300 or ReadByte);
    4525162  end
    453   else if Opcode = Byte(inPrefixFd) then begin
    454     Instruction := TInstruction($400 or Opcode);
     5163  else if Opcode = $FD then begin
     5164    Instruction := TInstruction($400 or ReadByte);
    4555165  end
    4565166  else Instruction := TInstruction(Opcode);
  • trunk/Z80/Z80InstructionInfo.pas

    r6 r7  
    1111    ptRegB, ptRegC, ptRegD, ptRegE, ptRegH, ptRegL, ptRegBC, ptRegDE, ptRegHL,
    1212    ptRegSP, ptRegIX, ptRegIY, ptRegBCIndir, ptRegDEIndir, ptRegHLIndir,
    13     ptFlagZ, ptFlagNZ, ptFlagC, ptFlagNC, pt00, pt08, pt10, pt18, pt20, pt28,
    14     pt30, pt38, pt0, pt1, pt2);
     13    ptRegSPIndir,
     14    ptFlagZ, ptFlagNZ, ptFlagC, ptFlagNC, ptFlagP, ptFlagPO,
     15    pt00, pt08, pt10, pt18, pt20, pt28, pt30, pt38,
     16    pt0, pt1, pt2, pt3, pt4, pt5, pt6, pt7);
    1517
    1618  TParamTypes = array of TParamType;
     
    2123    Params: TParamTypes;
    2224    Description: string;
     25    Cycles: Integer;
     26    CycleFalseCond: Integer;
    2327  end;
    2428
     
    3034    function SearchInstruction(Instruction: TInstruction): TInstructionInfo;
    3135    function AddNew(Instruction: TInstruction; Name: string;
    32       Params: TParamTypes; Description: string = ''): TInstructionInfo;
     36      Params: TParamTypes; Description: string = ''; Cycles: Integer = 0; CycleFalseCond: Integer = 0): TInstructionInfo;
    3337    function Check(InstructionMethods: TInstructionMethods): string;
    3438    constructor Create;
     
    3640  end;
    3741
     42
     43function StrToParamType(Text: string): TParamType;
     44
    3845const
    3946  ParamTypeText: array[TParamType] of string = ('', 'n', '(n)', 'nn', '(nn)', 'A', 'B',
    4047    'C', 'D', 'E', 'H', 'L', 'BC', 'DE', 'HL', 'SP', 'IX', 'IY', '(BC)',
    41     '(DE)', '(HL)', 'Z', 'NZ', 'C', 'NC', '00', '08', '10', '18', '20', '28',
    42     '30', '38', '0', '1', '2');
     48    '(DE)', '(HL)', '(SP)', 'Z', 'NZ', 'C', 'NC', 'P', 'PO',
     49    '00H', '08H', '10H', '18H', '20h', '28H', '30H', '38H',
     50    '0', '1', '2', '3', '4', '5', '6', '7');
    4351
    4452
     
    6977
    7078function TInstructionSet.AddNew(Instruction: TInstruction; Name: string;
    71   Params: TParamTypes; Description: string = ''): TInstructionInfo;
     79  Params: TParamTypes; Description: string = ''; Cycles: Integer = 0;
     80  CycleFalseCond: Integer = 0): TInstructionInfo;
    7281begin
    7382  Result := TInstructionInfo.Create;
     
    7685  Result.Params := Params;
    7786  Result.Description := Description;
     87  Result.Cycles := Cycles;
     88  Result.CycleFalseCond := CycleFalseCond;
    7889  Items.Add(Result);
    7990end;
     
    8192function TInstructionSet.Check(InstructionMethods: TInstructionMethods): string;
    8293var
    83   I: Integer;
    8494  Instruction: TInstruction;
    8595  InstructionInfo: TInstructionInfo;
     
    96106end;
    97107
     108function StrToParamType(Text: string): TParamType;
     109var
     110  ParamType: TParamType;
     111begin
     112  Text := Text.ToLower;
     113  for ParamType := Low(TParamType) to High(TParamType) do
     114    if Text = ParamTypeText[ParamType].ToLower then begin
     115      Result := ParamType;
     116      Break;
     117    end;
     118end;
     119
    98120constructor TInstructionSet.Create;
    99121begin
    100122  Items := TObjectList<TInstructionInfo>.Create;
    101   AddNew(in_NOP, 'NOP', []);
    102   AddNew(in_HALT, 'HALT', []);
    103   AddNew(in_LD_A_n, 'LD', [ptRegA, ptNumberByte]);
    104   AddNew(in_LD_B_n, 'LD', [ptRegB, ptNumberByte]);
    105   AddNew(in_LD_SP_nn, 'LD', [ptRegSP, ptNumberWord]);
    106   AddNew(in_LD_A_C, 'LD', [ptRegA, ptRegC]);
    107   AddNew(in_LD_C_A, 'LD', [ptRegC, ptRegA]);
    108   AddNew(in_LD_HL_nn, 'LD', [ptRegHL, ptNumberWord]);
    109   AddNew(in_LD_BC_nn, 'LD', [ptRegBC, ptNumberWord]);
    110   AddNew(in_LD_DE_nn, 'LD', [ptRegDE, ptNumberWord]);
    111   AddNew(in_LD_HL_Indirect_n, 'LD', [ptRegHLIndir, ptNumberByte]);
    112   AddNew(in_LD_nn_Indirect_A, 'LD', [ptNumberWordIndir, ptRegA]);
    113   AddNew(in_LD_C_HL_Indirect, 'LD', [ptRegC, ptRegHLIndir]);
    114   AddNew(in_LD_BC_Indirect_A, 'LD', [ptRegBCIndir, ptRegA]);
    115   AddNew(in_LD_HL_Indirect_nn, 'LD', [ptRegHLIndir, ptNumberWord]);
    116   AddNew(in_JP_nn, 'JP', [ptNumberWord]);
    117   AddNew(in_JP_ZN_nn, 'JP', [ptFlagZ, ptNumberWord]);
    118   AddNew(in_CP_N, 'CP', [ptNumberByte]);
    119   AddNew(in_CP_D, 'CP', [ptRegD]);
    120   AddNew(in_CP_E, 'CP', [ptRegE]);
    121   AddNew(in_CALL_nn, 'CALL', [ptNumberWord]);
    122   AddNew(in_RET, 'RET', []);
    123   AddNew(in_RST_00, 'RST', [pt00]);
    124   AddNew(in_RST_08, 'RST', [pt08]);
    125   AddNew(in_RST_10, 'RST', [pt10]);
    126   AddNew(in_RST_18, 'RST', [pt18]);
    127   AddNew(in_RST_20, 'RST', [pt20]);
    128   AddNew(in_RST_28, 'RST', [pt28]);
    129   AddNew(in_RST_30, 'RST', [pt30]);
    130   AddNew(in_RST_38, 'RST', [pt38]);
    131   AddNew(in_DI, 'DI', []);
    132   AddNew(in_EI, 'EI', []);
    133   AddNew(in_IM1, 'IM', [pt1]);
    134   AddNew(in_XOR_A, 'XOR', [ptRegA]);
    135   AddNew(in_PUSH_BC, 'PUSH', [ptRegBC]);
    136   AddNew(in_PUSH_DE, 'PUSH', [ptRegDE]);
    137   AddNew(in_PUSH_HL, 'PUSH', [ptRegHL]);
    138   AddNew(in_SBC_HL_DE, 'SBC', [ptRegHL, ptRegDE]);
    139   AddNew(in_EX_DE_HL, 'EX', [ptRegDE, ptRegHL]);
    140   AddNew(in_DEC_HL, 'DEC', [ptRegHL]);
    141   AddNew(in_DEC_B, 'INC', [ptRegB]);
    142   AddNew(in_INC_HL, 'INC', [ptRegHL]);
    143   AddNew(in_INC_BC, 'INC', [ptRegBC]);
    144   AddNew(in_INC_B, 'INC', [ptRegB]);
    145   AddNew(in_LD_HL_Indirect_E, 'LD', [ptRegHLIndir, ptRegE]);
    146   AddNew(in_LD_HL_Indirect_D, 'LD', [ptRegHLIndir, ptRegD]);
    147   AddNew(in_LD_A_HL_Indirect, 'LD', [ptRegA, ptRegHLIndir]);
    148   AddNew(in_JR_NZ_d, 'JR', [ptFlagNZ, ptNumberByte]);
    149   AddNew(in_JR_NC_d, 'JR', [ptFlagNC, ptNumberByte]);
    150   AddNew(in_OUT_N_A, 'OUT', [ptNumberByteIndir, ptRegA]);
    151   AddNew(in_ADD_HL_BC, 'ADD', [ptRegHL, ptRegBC]);
    152   AddNew(in_RLCA, 'RLCA', []);
     123  AddNew(in_NOP, 'NOP', [], 'No operation is performed.', 4, 0);
     124  AddNew(in_LD_BC_NN, 'LD', [ptRegBC, ptNumberWord], 'Loads nn into BC.', 10, 0);
     125  AddNew(in_LD_BC_Indirect_A, 'LD', [ptRegBCIndir, ptRegA], 'Stores A into the memory location pointed to by BC.', 7, 0);
     126  AddNew(in_INC_BC, 'INC', [ptRegBC], 'Adds one to BC.', 6, 0);
     127  AddNew(in_INC_B, 'INC', [ptRegB], 'Adds one to B.', 4, 0);
     128  AddNew(in_DEC_B, 'DEC', [ptRegB], 'Subtracts one from B.', 4, 0);
     129  AddNew(in_LD_B_N, 'LD', [ptRegB, ptNumberByte], 'Loads n into B.', 7, 0);
     130  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);
     131  AddNew(in_EX_AF_AF_Pair, 'EX', [], 'Exchanges the 16-bit contents of AF and AF''.', 4, 0);
     132  AddNew(in_ADD_HL_BC, 'ADD', [ptRegHL, ptRegBC], 'The value of BC is added to HL.', 11, 0);
     133  AddNew(in_LD_A_BC_Indirect, 'LD', [ptRegA, ptRegBCIndir], 'Loads the value pointed to by BC into A.', 7, 0);
     134  AddNew(in_DEC_BC, 'DEC', [ptRegBC], 'Subtracts one from BC.', 6, 0);
     135  AddNew(in_INC_C, 'INC', [ptRegC], 'Adds one to C.', 4, 0);
     136  AddNew(in_DEC_C, 'DEC', [ptRegC], 'Subtracts one from C.', 4, 0);
     137  AddNew(in_LD_C_N, 'LD', [ptRegC, ptNumberByte], 'Loads n into C.', 7, 0);
     138  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);
     139  AddNew(in_DJNZ_D, 'DJNZ', [ptRegD], '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);
     140  AddNew(in_LD_DE_NN, 'LD', [ptRegDE, ptNumberWord], 'Loads nn into DE.', 10, 0);
     141  AddNew(in_LD_DE_Indirect_A, 'LD', [ptRegDEIndir, ptRegA], 'Stores A into the memory location pointed to by DE.', 7, 0);
     142  AddNew(in_INC_DE, 'INC', [ptRegDE], 'Adds one to DE.', 6, 0);
     143  AddNew(in_INC_D, 'INC', [ptRegD], 'Adds one to D.', 4, 0);
     144  AddNew(in_DEC_D, 'DEC', [ptRegD], 'Subtracts one from D.', 4, 0);
     145  AddNew(in_LD_D_N, 'LD', [ptRegD, ptNumberByte], 'Loads n into D.', 7, 0);
     146  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);
     147  AddNew(in_JR_D, 'JR', [ptRegD], 'The signed value d is added to PC. The jump is measured from the start of the instruction opcode.', 12, 0);
     148  AddNew(in_ADD_HL_DE, 'ADD', [ptRegHL, ptRegDE], 'The value of DE is added to HL.', 11, 0);
     149  AddNew(in_LD_A_DE_Indirect, 'LD', [ptRegA, ptRegDEIndir], 'Loads the value pointed to by DE into A.', 7, 0);
     150  AddNew(in_DEC_DE, 'DEC', [ptRegDE], 'Subtracts one from DE.', 6, 0);
     151  AddNew(in_INC_E, 'INC', [ptRegE], 'Adds one to E.', 4, 0);
     152  AddNew(in_DEC_E, 'DEC', [ptRegE], 'Subtracts one from E.', 4, 0);
     153  AddNew(in_LD_E_N, 'LD', [ptRegE, ptNumberByte], 'Loads n into E.', 7, 0);
     154  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);
     155  AddNew(in_JR_NZ_D, 'JR', [ptFlagNZ, ptRegD], '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);
     156  AddNew(in_LD_HL_NN, 'LD', [ptRegHL, ptNumberWord], 'Loads nn into HL.', 10, 0);
     157  AddNew(in_LD_NN_Indirect_HL, 'LD', [ptNumberWordIndir, ptRegHL], 'Stores HL into the memory location pointed to by nn.', 16, 0);
     158  AddNew(in_INC_HL, 'INC', [ptRegHL], 'Adds one to HL.', 6, 0);
     159  AddNew(in_INC_H, 'INC', [ptRegH], 'Adds one to H.', 4, 0);
     160  AddNew(in_DEC_H, 'DEC', [ptRegH], 'Subtracts one from H.', 4, 0);
     161  AddNew(in_LD_H_N, 'LD', [ptRegH, ptNumberByte], 'Loads n into H.', 7, 0);
     162  AddNew(in_DAA, 'DAA', [], 'Adjusts A for BCD addition and subtraction operations.', 4, 0);
     163  AddNew(in_JR_Z_D, 'JR', [ptFlagZ, ptRegD], '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);
     164  AddNew(in_ADD_HL_HL, 'ADD', [ptRegHL, ptRegHL], 'The value of HL is added to HL.', 11, 0);
     165  AddNew(in_LD_HL_NN_Indirect, 'LD', [ptRegHL, ptNumberWordIndir], 'Loads the value pointed to by nn into HL.', 16, 0);
     166  AddNew(in_DEC_HL, 'DEC', [ptRegHL], 'Subtracts one from HL.', 6, 0);
     167  AddNew(in_INC_L, 'INC', [ptRegL], 'Adds one to L.', 4, 0);
     168  AddNew(in_DEC_L, 'DEC', [ptRegL], 'Subtracts one from L.', 4, 0);
     169  AddNew(in_LD_L_N, 'LD', [ptRegL, ptNumberByte], 'Loads n into L.', 7, 0);
     170  AddNew(in_CPL, 'CPL', [], 'The contents of A are inverted (one''s complement).', 4, 0);
     171  AddNew(in_JR_NC_D, 'JR', [ptFlagNC, ptRegD], '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);
     172  AddNew(in_LD_SP_NN, 'LD', [ptRegSP, ptNumberWord], 'Loads nn into SP.', 10, 0);
     173  AddNew(in_LD_NN_Indirect_A, 'LD', [ptNumberWordIndir, ptRegA], 'Stores A into the memory location pointed to by nn.', 13, 0);
     174  AddNew(in_INC_SP, 'INC', [ptRegSP], 'Adds one to SP.', 6, 0);
     175  AddNew(in_INC_HL_Indirect, 'INC', [ptRegHLIndir], 'Adds one to (HL).', 11, 0);
     176  AddNew(in_DEC_HL_Indirect, 'DEC', [ptRegHLIndir], 'Subtracts one from (HL).', 11, 0);
     177  AddNew(in_LD_HL_Indirect_N, 'LD', [ptRegHLIndir, ptNumberByte], 'Loads n into (HL).', 10, 0);
     178  AddNew(in_SCF, 'SCF', [], 'Sets the carry flag.', 4, 0);
     179  AddNew(in_JR_C_D, 'JR', [ptRegC, ptRegD], '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);
     180  AddNew(in_ADD_HL_SP, 'ADD', [ptRegHL, ptRegSP], 'The value of SP is added to HL.', 11, 0);
     181  AddNew(in_LD_A_NN_Indirect, 'LD', [ptRegA, ptNumberWordIndir], 'Loads the value pointed to by nn into A.', 13, 0);
     182  AddNew(in_DEC_SP, 'DEC', [ptRegSP], 'Subtracts one from SP.', 6, 0);
     183  AddNew(in_INC_A, 'INC', [ptRegA], 'Adds one to A.', 4, 0);
     184  AddNew(in_DEC_A, 'DEC', [ptRegA], 'Subtracts one from A.', 4, 0);
     185  AddNew(in_LD_A_N, 'LD', [ptRegA, ptNumberByte], 'Loads n into A.', 7, 0);
     186  AddNew(in_CCF, 'CCF', [], 'Inverts the carry flag.', 4, 0);
     187  AddNew(in_LD_B_B, 'LD', [ptRegB, ptRegB], 'The contents of B are loaded into B.', 4, 0);
     188  AddNew(in_LD_B_C, 'LD', [ptRegB, ptRegC], 'The contents of C are loaded into B.', 4, 0);
     189  AddNew(in_LD_B_D, 'LD', [ptRegB, ptRegD], 'The contents of D are loaded into B.', 4, 0);
     190  AddNew(in_LD_B_E, 'LD', [ptRegB, ptRegE], 'The contents of E are loaded into B.', 4, 0);
     191  AddNew(in_LD_B_H, 'LD', [ptRegB, ptRegH], 'The contents of H are loaded into B.', 4, 0);
     192  AddNew(in_LD_B_L, 'LD', [ptRegB, ptRegL], 'The contents of L are loaded into B.', 4, 0);
     193  AddNew(in_LD_B_HL_Indirect, 'LD', [ptRegB, ptRegHLIndir], 'The contents of (HL) are loaded into B.', 7, 0);
     194  AddNew(in_LD_B_A, 'LD', [ptRegB, ptRegA], 'The contents of A are loaded into B.', 4, 0);
     195  AddNew(in_LD_C_B, 'LD', [ptRegC, ptRegB], 'The contents of B are loaded into C.', 4, 0);
     196  AddNew(in_LD_C_C, 'LD', [ptRegC, ptRegC], 'The contents of C are loaded into C.', 4, 0);
     197  AddNew(in_LD_C_D, 'LD', [ptRegC, ptRegD], 'The contents of D are loaded into C.', 4, 0);
     198  AddNew(in_LD_C_E, 'LD', [ptRegC, ptRegE], 'The contents of E are loaded into C.', 4, 0);
     199  AddNew(in_LD_C_H, 'LD', [ptRegC, ptRegH], 'The contents of H are loaded into C.', 4, 0);
     200  AddNew(in_LD_C_L, 'LD', [ptRegC, ptRegL], 'The contents of L are loaded into C.', 4, 0);
     201  AddNew(in_LD_C_HL_Indirect, 'LD', [ptRegC, ptRegHLIndir], 'The contents of (HL) are loaded into C.', 7, 0);
     202  AddNew(in_LD_C_A, 'LD', [ptRegC, ptRegA], 'The contents of A are loaded into C.', 4, 0);
     203  AddNew(in_LD_D_B, 'LD', [ptRegD, ptRegB], 'The contents of B are loaded into D.', 4, 0);
     204  AddNew(in_LD_D_C, 'LD', [ptRegD, ptRegC], 'The contents of C are loaded into D.', 4, 0);
     205  AddNew(in_LD_D_D, 'LD', [ptRegD, ptRegD], 'The contents of D are loaded into D.', 4, 0);
     206  AddNew(in_LD_D_E, 'LD', [ptRegD, ptRegE], 'The contents of E are loaded into D.', 4, 0);
     207  AddNew(in_LD_D_H, 'LD', [ptRegD, ptRegH], 'The contents of H are loaded into D.', 4, 0);
     208  AddNew(in_LD_D_L, 'LD', [ptRegD, ptRegL], 'The contents of L are loaded into D.', 4, 0);
     209  AddNew(in_LD_D_HL_Indirect, 'LD', [ptRegD, ptRegHLIndir], 'The contents of (HL) are loaded into D.', 7, 0);
     210  AddNew(in_LD_D_A, 'LD', [ptRegD, ptRegA], 'The contents of A are loaded into D.', 4, 0);
     211  AddNew(in_LD_E_B, 'LD', [ptRegE, ptRegB], 'The contents of B are loaded into E.', 4, 0);
     212  AddNew(in_LD_E_C, 'LD', [ptRegE, ptRegC], 'The contents of C are loaded into E.', 4, 0);
     213  AddNew(in_LD_E_D, 'LD', [ptRegE, ptRegD], 'The contents of D are loaded into E.', 4, 0);
     214  AddNew(in_LD_E_E, 'LD', [ptRegE, ptRegE], 'The contents of E are loaded into E.', 4, 0);
     215  AddNew(in_LD_E_H, 'LD', [ptRegE, ptRegH], 'The contents of H are loaded into E.', 4, 0);
     216  AddNew(in_LD_E_L, 'LD', [ptRegE, ptRegL], 'The contents of L are loaded into E.', 4, 0);
     217  AddNew(in_LD_E_HL_Indirect, 'LD', [ptRegE, ptRegHLIndir], 'The contents of (HL) are loaded into E.', 7, 0);
     218  AddNew(in_LD_E_A, 'LD', [ptRegE, ptRegA], 'The contents of A are loaded into E.', 4, 0);
     219  AddNew(in_LD_H_B, 'LD', [ptRegH, ptRegB], 'The contents of B are loaded into H.', 4, 0);
     220  AddNew(in_LD_H_C, 'LD', [ptRegH, ptRegC], 'The contents of C are loaded into H.', 4, 0);
     221  AddNew(in_LD_H_D, 'LD', [ptRegH, ptRegD], 'The contents of D are loaded into H.', 4, 0);
     222  AddNew(in_LD_H_E, 'LD', [ptRegH, ptRegE], 'The contents of E are loaded into H.', 4, 0);
     223  AddNew(in_LD_H_H, 'LD', [ptRegH, ptRegH], 'The contents of H are loaded into H.', 4, 0);
     224  AddNew(in_LD_H_L, 'LD', [ptRegH, ptRegL], 'The contents of L are loaded into H.', 4, 0);
     225  AddNew(in_LD_H_HL_Indirect, 'LD', [ptRegH, ptRegHLIndir], 'The contents of (HL) are loaded into H.', 7, 0);
     226  AddNew(in_LD_H_A, 'LD', [ptRegH, ptRegA], 'The contents of A are loaded into H.', 4, 0);
     227  AddNew(in_LD_L_B, 'LD', [ptRegL, ptRegB], 'The contents of B are loaded into L.', 4, 0);
     228  AddNew(in_LD_L_C, 'LD', [ptRegL, ptRegC], 'The contents of C are loaded into L.', 4, 0);
     229  AddNew(in_LD_L_D, 'LD', [ptRegL, ptRegD], 'The contents of D are loaded into L.', 4, 0);
     230  AddNew(in_LD_L_E, 'LD', [ptRegL, ptRegE], 'The contents of E are loaded into L.', 4, 0);
     231  AddNew(in_LD_L_H, 'LD', [ptRegL, ptRegH], 'The contents of H are loaded into L.', 4, 0);
     232  AddNew(in_LD_L_L, 'LD', [ptRegL, ptRegL], 'The contents of L are loaded into L.', 4, 0);
     233  AddNew(in_LD_L_HL_Indirect, 'LD', [ptRegL, ptRegHLIndir], 'The contents of (HL) are loaded into L.', 7, 0);
     234  AddNew(in_LD_L_A, 'LD', [ptRegL, ptRegA], 'The contents of A are loaded into L.', 4, 0);
     235  AddNew(in_LD_HL_Indirect_B, 'LD', [ptRegHLIndir, ptRegB], 'The contents of B are loaded into (HL).', 7, 0);
     236  AddNew(in_LD_HL_Indirect_C, 'LD', [ptRegHLIndir, ptRegC], 'The contents of C are loaded into (HL).', 7, 0);
     237  AddNew(in_LD_HL_Indirect_D, 'LD', [ptRegHLIndir, ptRegD], 'The contents of D are loaded into (HL).', 7, 0);
     238  AddNew(in_LD_HL_Indirect_E, 'LD', [ptRegHLIndir, ptRegE], 'The contents of E are loaded into (HL).', 7, 0);
     239  AddNew(in_LD_HL_Indirect_H, 'LD', [ptRegHLIndir, ptRegH], 'The contents of H are loaded into (HL).', 7, 0);
     240  AddNew(in_LD_HL_Indirect_L, 'LD', [ptRegHLIndir, ptRegL], 'The contents of L are loaded into (HL).', 7, 0);
     241  AddNew(in_HALT, 'HALT', [], 'Suspends CPU operation until an interrupt or reset occurs.', 4, 0);
     242  AddNew(in_LD_HL_Indirect_A, 'LD', [ptRegHLIndir, ptRegA], 'The contents of A are loaded into (HL).', 7, 0);
     243  AddNew(in_LD_A_B, 'LD', [ptRegA, ptRegB], 'The contents of B are loaded into A.', 4, 0);
     244  AddNew(in_LD_A_C, 'LD', [ptRegA, ptRegC], 'The contents of C are loaded into A.', 4, 0);
     245  AddNew(in_LD_A_D, 'LD', [ptRegA, ptRegD], 'The contents of D are loaded into A.', 4, 0);
     246  AddNew(in_LD_A_E, 'LD', [ptRegA, ptRegE], 'The contents of E are loaded into A.', 4, 0);
     247  AddNew(in_LD_A_H, 'LD', [ptRegA, ptRegH], 'The contents of H are loaded into A.', 4, 0);
     248  AddNew(in_LD_A_L, 'LD', [ptRegA, ptRegL], 'The contents of L are loaded into A.', 4, 0);
     249  AddNew(in_LD_A_HL_Indirect, 'LD', [ptRegA, ptRegHLIndir], 'The contents of (HL) are loaded into A.', 7, 0);
     250  AddNew(in_LD_A_A, 'LD', [ptRegA, ptRegA], 'The contents of A are loaded into A.', 4, 0);
     251  AddNew(in_ADD_A_B, 'ADD', [ptRegA, ptRegB], 'Adds B to A.', 4, 0);
     252  AddNew(in_ADD_A_C, 'ADD', [ptRegA, ptRegC], 'Adds C to A.', 4, 0);
     253  AddNew(in_ADD_A_D, 'ADD', [ptRegA, ptRegD], 'Adds D to A.', 4, 0);
     254  AddNew(in_ADD_A_E, 'ADD', [ptRegA, ptRegE], 'Adds E to A.', 4, 0);
     255  AddNew(in_ADD_A_H, 'ADD', [ptRegA, ptRegH], 'Adds H to A.', 4, 0);
     256  AddNew(in_ADD_A_L, 'ADD', [ptRegA, ptRegL], 'Adds L to A.', 4, 0);
     257  AddNew(in_ADD_A_HL_Indirect, 'ADD', [ptRegA, ptRegHLIndir], 'Adds (HL) to A.', 7, 0);
     258  AddNew(in_ADD_A_A, 'ADD', [ptRegA, ptRegA], 'Adds A to A.', 4, 0);
     259  AddNew(in_ADC_A_B, 'ADC', [ptRegA, ptRegB], 'Adds B and the carry flag to A.', 4, 0);
     260  AddNew(in_ADC_A_C, 'ADC', [ptRegA, ptRegC], 'Adds C and the carry flag to A.', 4, 0);
     261  AddNew(in_ADC_A_D, 'ADC', [ptRegA, ptRegD], 'Adds D and the carry flag to A.', 4, 0);
     262  AddNew(in_ADC_A_E, 'ADC', [ptRegA, ptRegE], 'Adds E and the carry flag to A.', 4, 0);
     263  AddNew(in_ADC_A_H, 'ADC', [ptRegA, ptRegH], 'Adds H and the carry flag to A.', 4, 0);
     264  AddNew(in_ADC_A_L, 'ADC', [ptRegA, ptRegL], 'Adds L and the carry flag to A.', 4, 0);
     265  AddNew(in_ADC_A_HL_Indirect, 'ADC', [ptRegA, ptRegHLIndir], 'Adds (HL) and the carry flag to A.', 7, 0);
     266  AddNew(in_ADC_A_A, 'ADC', [ptRegA, ptRegA], 'Adds A and the carry flag to A.', 4, 0);
     267  AddNew(in_SUB_B, 'SUB', [ptRegB], 'Subtracts B from A.', 4, 0);
     268  AddNew(in_SUB_C, 'SUB', [ptRegC], 'Subtracts C from A.', 4, 0);
     269  AddNew(in_SUB_D, 'SUB', [ptRegD], 'Subtracts D from A.', 4, 0);
     270  AddNew(in_SUB_E, 'SUB', [ptRegE], 'Subtracts E from A.', 4, 0);
     271  AddNew(in_SUB_H, 'SUB', [ptRegH], 'Subtracts H from A.', 4, 0);
     272  AddNew(in_SUB_L, 'SUB', [ptRegL], 'Subtracts L from A.', 4, 0);
     273  AddNew(in_SUB_HL_Indirect, 'SUB', [ptRegHLIndir], 'Subtracts (HL) from A.', 7, 0);
     274  AddNew(in_SUB_A, 'SUB', [ptRegA], 'Subtracts A from A.', 4, 0);
     275  AddNew(in_SBC_A_B, 'SBC', [ptRegA, ptRegB], 'Subtracts B and the carry flag from A.', 4, 0);
     276  AddNew(in_SBC_A_C, 'SBC', [ptRegA, ptRegC], 'Subtracts C and the carry flag from A.', 4, 0);
     277  AddNew(in_SBC_A_D, 'SBC', [ptRegA, ptRegD], 'Subtracts D and the carry flag from A.', 4, 0);
     278  AddNew(in_SBC_A_E, 'SBC', [ptRegA, ptRegE], 'Subtracts E and the carry flag from A.', 4, 0);
     279  AddNew(in_SBC_A_H, 'SBC', [ptRegA, ptRegH], 'Subtracts H and the carry flag from A.', 4, 0);
     280  AddNew(in_SBC_A_L, 'SBC', [ptRegA, ptRegL], 'Subtracts L and the carry flag from A.', 4, 0);
     281  AddNew(in_SBC_A_HL_Indirect, 'SBC', [ptRegA, ptRegHLIndir], 'Subtracts (HL) and the carry flag from A.', 7, 0);
     282  AddNew(in_SBC_A_A, 'SBC', [ptRegA, ptRegA], 'Subtracts A and the carry flag from A.', 4, 0);
     283  AddNew(in_AND_B, 'AND', [ptRegB], 'Bitwise AND on A with B.', 4, 0);
     284  AddNew(in_AND_C, 'AND', [ptRegC], 'Bitwise AND on A with C.', 4, 0);
     285  AddNew(in_AND_D, 'AND', [ptRegD], 'Bitwise AND on A with D.', 4, 0);
     286  AddNew(in_AND_E, 'AND', [ptRegE], 'Bitwise AND on A with E.', 4, 0);
     287  AddNew(in_AND_H, 'AND', [ptRegH], 'Bitwise AND on A with H.', 4, 0);
     288  AddNew(in_AND_L, 'AND', [ptRegL], 'Bitwise AND on A with L.', 4, 0);
     289  AddNew(in_AND_HL_Indirect, 'AND', [ptRegHLIndir], 'Bitwise AND on A with (HL).', 7, 0);
     290  AddNew(in_AND_A, 'AND', [ptRegA], 'Bitwise AND on A with A.', 4, 0);
     291  AddNew(in_XOR_B, 'XOR', [ptRegB], 'Bitwise XOR on A with B.', 4, 0);
     292  AddNew(in_XOR_C, 'XOR', [ptRegC], 'Bitwise XOR on A with C.', 4, 0);
     293  AddNew(in_XOR_D, 'XOR', [ptRegD], 'Bitwise XOR on A with D.', 4, 0);
     294  AddNew(in_XOR_E, 'XOR', [ptRegE], 'Bitwise XOR on A with E.', 4, 0);
     295  AddNew(in_XOR_H, 'XOR', [ptRegH], 'Bitwise XOR on A with H.', 4, 0);
     296  AddNew(in_XOR_L, 'XOR', [ptRegL], 'Bitwise XOR on A with L.', 4, 0);
     297  AddNew(in_XOR_HL_Indirect, 'XOR', [ptRegHLIndir], 'Bitwise XOR on A with (HL).', 7, 0);
     298  AddNew(in_XOR_A, 'XOR', [ptRegA], 'Bitwise XOR on A with A.', 4, 0);
     299  AddNew(in_OR_B, 'OR', [ptRegB], 'Bitwise OR on A with B.', 4, 0);
     300  AddNew(in_OR_C, 'OR', [ptRegC], 'Bitwise OR on A with C.', 4, 0);
     301  AddNew(in_OR_D, 'OR', [ptRegD], 'Bitwise OR on A with D.', 4, 0);
     302  AddNew(in_OR_E, 'OR', [ptRegE], 'Bitwise OR on A with E.', 4, 0);
     303  AddNew(in_OR_H, 'OR', [ptRegH], 'Bitwise OR on A with H.', 4, 0);
     304  AddNew(in_OR_L, 'OR', [ptRegL], 'Bitwise OR on A with L.', 4, 0);
     305  AddNew(in_OR_HL_Indirect, 'OR', [ptRegHLIndir], 'Bitwise OR on A with (HL).', 7, 0);
     306  AddNew(in_OR_A, 'OR', [ptRegA], 'Bitwise OR on A with A.', 4, 0);
     307  AddNew(in_CP_B, 'CP', [ptRegB], 'Subtracts B from A and affects flags according to the result. A is not modified.', 4, 0);
     308  AddNew(in_CP_C, 'CP', [ptRegC], 'Subtracts C from A and affects flags according to the result. A is not modified.', 4, 0);
     309  AddNew(in_CP_D, 'CP', [ptRegD], 'Subtracts D from A and affects flags according to the result. A is not modified.', 4, 0);
     310  AddNew(in_CP_E, 'CP', [ptRegE], 'Subtracts E from A and affects flags according to the result. A is not modified.', 4, 0);
     311  AddNew(in_CP_H, 'CP', [ptRegH], 'Subtracts H from A and affects flags according to the result. A is not modified.', 4, 0);
     312  AddNew(in_CP_L, 'CP', [ptRegL], 'Subtracts L from A and affects flags according to the result. A is not modified.', 4, 0);
     313  AddNew(in_CP_HL_Indirect, 'CP', [ptRegHLIndir], 'Subtracts (HL) from A and affects flags according to the result. A is not modified.', 7, 0);
     314  AddNew(in_CP_A, 'CP', [ptRegA], 'Subtracts A from A and affects flags according to the result. A is not modified.', 4, 0);
     315  AddNew(in_RET_NZ, 'RET', [ptFlagNZ], 'If the zero flag is unset, the top stack entry is popped into PC.', 11, 5);
     316  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);
     317  AddNew(in_JP_NZ_NN, 'JP', [ptFlagNZ, ptNumberWord], 'If the zero flag is unset, nn is copied to PC.', 10, 0);
     318  AddNew(in_JP_NN, 'JP', [ptNumberWord], 'nn is copied to PC.', 10, 0);
     319  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);
     320  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);
     321  AddNew(in_ADD_A_N, 'ADD', [ptRegA, ptNumberByte], 'Adds n to A.', 7, 0);
     322  AddNew(in_RST_00H, 'RST', [pt00], 'The current PC value plus one is pushed onto the stack, then is loaded with 0.', 11, 0);
     323  AddNew(in_RET_Z, 'RET', [ptFlagZ], 'If the zero flag is set, the top stack entry is popped into PC.', 11, 5);
     324  AddNew(in_RET, 'RET', [], 'The top stack entry is popped into PC.', 10, 0);
     325  AddNew(in_JP_Z_NN, 'JP', [ptFlagZ, ptNumberWord], 'If the zero flag is set, nn is copied to PC.', 10, 0);
     326  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);
     327  AddNew(in_CALL_NN, 'CALL', [ptNumberWord], 'The current PC value plus three is pushed onto the stack, then is loaded with nn.', 17, 0);
     328  AddNew(in_ADC_A_N, 'ADC', [ptRegA, ptNumberByte], 'Adds n and the carry flag to A.', 7, 0);
     329  AddNew(in_RST_08H, 'RST', [pt08], 'The current PC value plus one is pushed onto the stack, then is loaded with 8.', 11, 0);
     330  AddNew(in_RET_NC, 'RET', [ptFlagNC], 'If the carry flag is unset, the top stack entry is popped into PC.', 11, 5);
     331  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);
     332  AddNew(in_JP_NC_NN, 'JP', [ptFlagNC, ptNumberWord], 'If the carry flag is unset, nn is copied to PC.', 10, 0);
     333  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);
     334  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);
     335  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);
     336  AddNew(in_SUB_N, 'SUB', [ptNumberByte], 'Subtracts n from A.', 7, 0);
     337  AddNew(in_RST_10H, 'RST', [pt10], 'The current PC value plus one is pushed onto the stack, then is loaded with 16.', 11, 0);
     338  AddNew(in_RET_C, 'RET', [ptRegC], 'If the carry flag is set, the top stack entry is popped into PC.', 11, 5);
     339  AddNew(in_EXX, 'EXX', [], 'Exchanges the 16-bit contents of BC, DE, and HL with BC'', DE'', and HL''.', 4, 0);
     340  AddNew(in_JP_C_NN, 'JP', [ptRegC, ptNumberWord], 'If the carry flag is set, nn is copied to PC.', 10, 0);
     341  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);
     342  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);
     343  AddNew(in_SBC_A_N, 'SBC', [ptRegA, ptNumberByte], 'Subtracts n and the carry flag from A.', 7, 0);
     344  AddNew(in_RST_18H, 'RST', [pt18], 'The current PC value plus one is pushed onto the stack, then is loaded with 24.', 11, 0);
     345  AddNew(in_RET_PO, 'RET', [ptFlagPO], 'If the parity/overflow flag is unset, the top stack entry is popped into PC.', 11, 5);
     346  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);
     347  AddNew(in_JP_PO_NN, 'JP', [ptFlagPO, ptNumberWord], 'If the parity/overflow flag is unset, nn is copied to PC.', 10, 0);
     348  AddNew(in_EX_SP_Indirect_HL, 'EX', [ptRegSPIndir, ptRegHL], 'Exchanges (SP) with L, and (SP+1) with H.', 19, 0);
     349  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);
     350  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);
     351  AddNew(in_AND_N, 'AND', [ptNumberByte], 'Bitwise AND on A with n.', 7, 0);
     352  AddNew(in_RST_20H, 'RST', [pt20], 'The current PC value plus one is pushed onto the stack, then is loaded with 32.', 11, 0);
     353  AddNew(in_RET_PE, 'RET', [], 'If the parity/overflow flag is set, the top stack entry is popped into PC.', 11, 5);
     354  AddNew(in_JP_HL_Indirect, 'JP', [ptRegHLIndir], 'Loads the value of HL into PC.', 4, 0);
     355  AddNew(in_JP_PE_NN, 'JP', [ptNumberWord], 'If the parity/overflow flag is set, nn is copied to PC.', 10, 0);
     356  AddNew(in_EX_DE_HL, 'EX', [ptRegDE, ptRegHL], 'Exchanges the 16-bit contents of DE and HL.', 4, 0);
     357  AddNew(in_CALL_PE_NN, 'CALL', [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);
     358  AddNew(in_XOR_N, 'XOR', [ptNumberByte], 'Bitwise XOR on A with n.', 7, 0);
     359  AddNew(in_RST_28H, 'RST', [pt28], 'The current PC value plus one is pushed onto the stack, then is loaded with 40.', 11, 0);
     360  AddNew(in_RET_P, 'RET', [ptFlagP], 'If the sign flag is unset, the top stack entry is popped into PC.', 11, 5);
     361  AddNew(in_POP_AF, 'POP', [], '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);
     362  AddNew(in_JP_P_NN, 'JP', [ptFlagP, ptNumberWord], 'If the sign flag is unset, nn is copied to PC.', 10, 0);
     363  AddNew(in_DI, 'DI', [], 'Resets both interrupt flip-flops, thus preventing maskable interrupts from triggering.', 4, 0);
     364  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);
     365  AddNew(in_PUSH_AF, 'PUSH', [], '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);
     366  AddNew(in_OR_N, 'OR', [ptNumberByte], 'Bitwise OR on A with n.', 7, 0);
     367  AddNew(in_RST_30H, 'RST', [pt30], 'The current PC value plus one is pushed onto the stack, then is loaded with 48.', 11, 0);
     368  AddNew(in_RET_M, 'RET', [], 'If the sign flag is set, the top stack entry is popped into PC.', 11, 5);
     369  AddNew(in_LD_SP_HL, 'LD', [ptRegSP, ptRegHL], 'Loads the value of HL into SP.', 6, 0);
     370  AddNew(in_JP_M_NN, 'JP', [ptNumberWord], 'If the sign flag is set, nn is copied to PC.', 10, 0);
     371  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);
     372  AddNew(in_CALL_M_NN, 'CALL', [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);
     373  AddNew(in_CP_N, 'CP', [ptNumberByte], 'Subtracts n from A and affects flags according to the result. A is not modified.', 7, 0);
     374  AddNew(in_RST_38H, 'RST', [pt38], 'The current PC value plus one is pushed onto the stack, then is loaded with 56.', 11, 0);
     375  AddNew(in_IN_B_C_Indirect, 'IN', [ptRegB], 'A byte from the port at the 16-bit address contained in the BC register pair is written to B.', 12, 0);
     376  AddNew(in_OUT_C_Indirect_B, 'OUT', [ptRegB], 'The value of B is written to the port at the 16-bit address contained in the BC register pair.', 12, 0);
     377  AddNew(in_SBC_HL_BC, 'SBC', [ptRegHL, ptRegBC], 'Subtracts BC and the carry flag from HL.', 15, 0);
     378  AddNew(in_LD_NN_Indirect_BC, 'LD', [ptNumberWordIndir, ptRegBC], 'Stores BC into the memory location pointed to by nn.', 20, 0);
     379  AddNew(in_NEG, 'NEG', [], 'The contents of A are negated (two''s complement). Operation is the same as subtracting A from zero.', 8, 0);
     380  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);
     381  AddNew(in_IM_0, 'IM', [pt0], 'Sets interrupt mode 0.', 8, 0);
     382  AddNew(in_LD_I_A, 'LD', [ptRegA], 'Stores the value of A into register I.', 9, 0);
     383  AddNew(in_IN_C_C_Indirect, 'IN', [ptRegC], 'A byte from the port at the 16-bit address contained in the BC register pair is written to C.', 12, 0);
     384  AddNew(in_OUT_C_Indirect_C, 'OUT', [ptRegC], 'The value of C is written to the port at the 16-bit address contained in the BC register pair.', 12, 0);
     385  AddNew(in_ADC_HL_BC, 'ADC', [ptRegHL, ptRegBC], 'Adds BC and the carry flag to HL.', 15, 0);
     386  AddNew(in_LD_BC_NN_Indirect, 'LD', [ptRegBC, ptNumberWordIndir], 'Loads the value pointed to by nn into BC.', 20, 0);
     387  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);
     388  AddNew(in_LD_R_A, 'LD', [ptRegA], 'Stores the value of A into register R.', 9, 0);
     389  AddNew(in_IN_D_C_Indirect, 'IN', [ptRegD], 'A byte from the port at the 16-bit address contained in the BC register pair is written to D.', 12, 0);
     390  AddNew(in_OUT_C_Indirect_D, 'OUT', [ptRegD], 'The value of D is written to the port at the 16-bit address contained in the BC register pair.', 12, 0);
     391  AddNew(in_SBC_HL_DE, 'SBC', [ptRegHL, ptRegDE], 'Subtracts DE and the carry flag from HL.', 15, 0);
     392  AddNew(in_LD_NN_Indirect_DE, 'LD', [ptNumberWordIndir, ptRegDE], 'Stores DE into the memory location pointed to by nn.', 20, 0);
     393  AddNew(in_IM_1, 'IM', [pt1], 'Sets interrupt mode 1.', 8, 0);
     394  AddNew(in_LD_A_I, 'LD', [ptRegA], 'Stores the value of register I into A.', 9, 0);
     395  AddNew(in_IN_E_C_Indirect, 'IN', [ptRegE], 'A byte from the port at the 16-bit address contained in the BC register pair is written to E.', 12, 0);
     396  AddNew(in_OUT_C_Indirect_E, 'OUT', [ptRegE], 'The value of E is written to the port at the 16-bit address contained in the BC register pair.', 12, 0);
     397  AddNew(in_ADC_HL_DE, 'ADC', [ptRegHL, ptRegDE], 'Adds DE and the carry flag to HL.', 15, 0);
     398  AddNew(in_LD_DE_NN_Indirect, 'LD', [ptRegDE, ptNumberWordIndir], 'Loads the value pointed to by nn into DE.', 20, 0);
     399  AddNew(in_IM_2, 'IM', [pt2], 'Sets interrupt mode 2.', 8, 0);
     400  AddNew(in_LD_A_R, 'LD', [ptRegA], 'Stores the value of register R into A.', 9, 0);
     401  AddNew(in_IN_H_C_Indirect, 'IN', [ptRegH], 'A byte from the port at the 16-bit address contained in the BC register pair is written to H.', 12, 0);
     402  AddNew(in_OUT_C_Indirect_H, 'OUT', [ptRegH], 'The value of H is written to the port at the 16-bit address contained in the BC register pair.', 12, 0);
     403  AddNew(in_SBC_HL_HL, 'SBC', [ptRegHL, ptRegHL], 'Subtracts HL and the carry flag from HL.', 15, 0);
     404  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);
     405  AddNew(in_IN_L_C_Indirect, 'IN', [ptRegL], 'A byte from the port at the 16-bit address contained in the BC register pair is written to L.', 12, 0);
     406  AddNew(in_OUT_C_Indirect_L, 'OUT', [ptRegL], 'The value of L is written to the port at the 16-bit address contained in the BC register pair.', 12, 0);
     407  AddNew(in_ADC_HL_HL, 'ADC', [ptRegHL, ptRegHL], 'Adds HL and the carry flag to HL.', 15, 0);
     408  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);
     409  AddNew(in_SBC_HL_SP, 'SBC', [ptRegHL, ptRegSP], 'Subtracts SP and the carry flag from HL.', 15, 0);
     410  AddNew(in_LD_NN_Indirect_SP, 'LD', [ptNumberWordIndir, ptRegSP], 'Stores SP into the memory location pointed to by nn.', 20, 0);
     411  AddNew(in_IN_A_C_Indirect, 'IN', [ptRegA], 'A byte from the port at the 16-bit address contained in the BC register pair is written to A.', 12, 0);
     412  AddNew(in_OUT_C_Indirect_A, 'OUT', [ptRegA], 'The value of A is written to the port at the 16-bit address contained in the BC register pair.', 12, 0);
     413  AddNew(in_ADC_HL_SP, 'ADC', [ptRegHL, ptRegSP], 'Adds SP and the carry flag to HL.', 15, 0);
     414  AddNew(in_LD_SP_NN_Indirect, 'LD', [ptRegSP, ptNumberWordIndir], 'Loads the value pointed to by nn into SP.', 20, 0);
     415  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);
     416  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);
     417  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);
     418  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);
     419  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);
     420  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);
     421  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);
     422  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);
     423  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);
     424  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);
     425  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);
     426  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);
     427  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);
     428  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);
     429  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);
     430  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);
     431  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);
     432  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);
     433  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);
     434  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);
     435  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);
     436  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);
     437  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);
     438  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);
     439  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);
     440  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);
     441  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);
     442  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);
     443  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);
     444  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);
     445  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);
     446  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);
     447  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);
     448  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);
     449  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);
     450  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);
     451  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);
     452  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);
     453  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);
     454  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);
     455  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);
     456  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);
     457  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);
     458  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);
     459  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);
     460  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);
     461  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);
     462  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);
     463  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);
     464  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);
     465  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);
     466  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);
     467  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);
     468  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);
     469  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);
     470  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);
     471  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);
     472  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);
     473  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);
     474  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);
     475  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);
     476  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);
     477  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);
     478  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);
     479  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);
     480  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);
     481  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);
     482  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);
     483  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);
     484  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);
     485  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);
     486  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);
     487  AddNew(in_BIT_0_B, 'BIT', [pt0, ptRegB], 'Tests bit 0 of B.', 8, 0);
     488  AddNew(in_BIT_0_C, 'BIT', [pt0, ptRegC], 'Tests bit 0 of C.', 8, 0);
     489  AddNew(in_BIT_0_D, 'BIT', [pt0, ptRegD], 'Tests bit 0 of D.', 8, 0);
     490  AddNew(in_BIT_0_E, 'BIT', [pt0, ptRegE], 'Tests bit 0 of E.', 8, 0);
     491  AddNew(in_BIT_0_H, 'BIT', [pt0, ptRegH], 'Tests bit 0 of H.', 8, 0);
     492  AddNew(in_BIT_0_L, 'BIT', [pt0, ptRegL], 'Tests bit 0 of L.', 8, 0);
     493  AddNew(in_BIT_0_HL_Indirect, 'BIT', [pt0, ptRegHLIndir], 'Tests bit 0 of (HL).', 12, 0);
     494  AddNew(in_BIT_0_A, 'BIT', [pt0, ptRegA], 'Tests bit 0 of A.', 8, 0);
     495  AddNew(in_BIT_1_B, 'BIT', [pt1, ptRegB], 'Tests bit 1 of B.', 8, 0);
     496  AddNew(in_BIT_1_C, 'BIT', [pt1, ptRegC], 'Tests bit 1 of C.', 8, 0);
     497  AddNew(in_BIT_1_D, 'BIT', [pt1, ptRegD], 'Tests bit 1 of D.', 8, 0);
     498  AddNew(in_BIT_1_E, 'BIT', [pt1, ptRegE], 'Tests bit 1 of E.', 8, 0);
     499  AddNew(in_BIT_1_H, 'BIT', [pt1, ptRegH], 'Tests bit 1 of H.', 8, 0);
     500  AddNew(in_BIT_1_L, 'BIT', [pt1, ptRegL], 'Tests bit 1 of L.', 8, 0);
     501  AddNew(in_BIT_1_HL_Indirect, 'BIT', [pt1, ptRegHLIndir], 'Tests bit 1 of (HL).', 12, 0);
     502  AddNew(in_BIT_1_A, 'BIT', [pt1, ptRegA], 'Tests bit 1 of A.', 8, 0);
     503  AddNew(in_BIT_2_B, 'BIT', [pt2, ptRegB], 'Tests bit 2 of B.', 8, 0);
     504  AddNew(in_BIT_2_C, 'BIT', [pt2, ptRegC], 'Tests bit 2 of C.', 8, 0);
     505  AddNew(in_BIT_2_D, 'BIT', [pt2, ptRegD], 'Tests bit 2 of D.', 8, 0);
     506  AddNew(in_BIT_2_E, 'BIT', [pt2, ptRegE], 'Tests bit 2 of E.', 8, 0);
     507  AddNew(in_BIT_2_H, 'BIT', [pt2, ptRegH], 'Tests bit 2 of H.', 8, 0);
     508  AddNew(in_BIT_2_L, 'BIT', [pt2, ptRegL], 'Tests bit 2 of L.', 8, 0);
     509  AddNew(in_BIT_2_HL_Indirect, 'BIT', [pt2, ptRegHLIndir], 'Tests bit 2 of (HL).', 12, 0);
     510  AddNew(in_BIT_2_A, 'BIT', [pt2, ptRegA], 'Tests bit 2 of A.', 8, 0);
     511  AddNew(in_BIT_3_B, 'BIT', [pt3, ptRegB], 'Tests bit 3 of B.', 8, 0);
     512  AddNew(in_BIT_3_C, 'BIT', [pt3, ptRegC], 'Tests bit 3 of C.', 8, 0);
     513  AddNew(in_BIT_3_D, 'BIT', [pt3, ptRegD], 'Tests bit 3 of D.', 8, 0);
     514  AddNew(in_BIT_3_E, 'BIT', [pt3, ptRegE], 'Tests bit 3 of E.', 8, 0);
     515  AddNew(in_BIT_3_H, 'BIT', [pt3, ptRegH], 'Tests bit 3 of H.', 8, 0);
     516  AddNew(in_BIT_3_L, 'BIT', [pt3, ptRegL], 'Tests bit 3 of L.', 8, 0);
     517  AddNew(in_BIT_3_HL_Indirect, 'BIT', [pt3, ptRegHLIndir], 'Tests bit 3 of (HL).', 12, 0);
     518  AddNew(in_BIT_3_A, 'BIT', [pt3, ptRegA], 'Tests bit 3 of A.', 8, 0);
     519  AddNew(in_BIT_4_B, 'BIT', [pt4, ptRegB], 'Tests bit 4 of B.', 8, 0);
     520  AddNew(in_BIT_4_C, 'BIT', [pt4, ptRegC], 'Tests bit 4 of C.', 8, 0);
     521  AddNew(in_BIT_4_D, 'BIT', [pt4, ptRegD], 'Tests bit 4 of D.', 8, 0);
     522  AddNew(in_BIT_4_E, 'BIT', [pt4, ptRegE], 'Tests bit 4 of E.', 8, 0);
     523  AddNew(in_BIT_4_H, 'BIT', [pt4, ptRegH], 'Tests bit 4 of H.', 8, 0);
     524  AddNew(in_BIT_4_L, 'BIT', [pt4, ptRegL], 'Tests bit 4 of L.', 8, 0);
     525  AddNew(in_BIT_4_HL_Indirect, 'BIT', [pt4, ptRegHLIndir], 'Tests bit 4 of (HL).', 12, 0);
     526  AddNew(in_BIT_4_A, 'BIT', [pt4, ptRegA], 'Tests bit 4 of A.', 8, 0);
     527  AddNew(in_BIT_5_B, 'BIT', [pt5, ptRegB], 'Tests bit 5 of B.', 8, 0);
     528  AddNew(in_BIT_5_C, 'BIT', [pt5, ptRegC], 'Tests bit 5 of C.', 8, 0);
     529  AddNew(in_BIT_5_D, 'BIT', [pt5, ptRegD], 'Tests bit 5 of D.', 8, 0);
     530  AddNew(in_BIT_5_E, 'BIT', [pt5, ptRegE], 'Tests bit 5 of E.', 8, 0);
     531  AddNew(in_BIT_5_H, 'BIT', [pt5, ptRegH], 'Tests bit 5 of H.', 8, 0);
     532  AddNew(in_BIT_5_L, 'BIT', [pt5, ptRegL], 'Tests bit 5 of L.', 8, 0);
     533  AddNew(in_BIT_5_HL_Indirect, 'BIT', [pt5, ptRegHLIndir], 'Tests bit 5 of (HL).', 12, 0);
     534  AddNew(in_BIT_5_A, 'BIT', [pt5, ptRegA], 'Tests bit 5 of A.', 8, 0);
     535  AddNew(in_BIT_6_B, 'BIT', [pt6, ptRegB], 'Tests bit 6 of B.', 8, 0);
     536  AddNew(in_BIT_6_C, 'BIT', [pt6, ptRegC], 'Tests bit 6 of C.', 8, 0);
     537  AddNew(in_BIT_6_D, 'BIT', [pt6, ptRegD], 'Tests bit 6 of D.', 8, 0);
     538  AddNew(in_BIT_6_E, 'BIT', [pt6, ptRegE], 'Tests bit 6 of E.', 8, 0);
     539  AddNew(in_BIT_6_H, 'BIT', [pt6, ptRegH], 'Tests bit 6 of H.', 8, 0);
     540  AddNew(in_BIT_6_L, 'BIT', [pt6, ptRegL], 'Tests bit 6 of L.', 8, 0);
     541  AddNew(in_BIT_6_HL_Indirect, 'BIT', [pt6, ptRegHLIndir], 'Tests bit 6 of (HL).', 12, 0);
     542  AddNew(in_BIT_6_A, 'BIT', [pt6, ptRegA], 'Tests bit 6 of A.', 8, 0);
     543  AddNew(in_BIT_7_B, 'BIT', [pt7, ptRegB], 'Tests bit 7 of B.', 8, 0);
     544  AddNew(in_BIT_7_C, 'BIT', [pt7, ptRegC], 'Tests bit 7 of C.', 8, 0);
     545  AddNew(in_BIT_7_D, 'BIT', [pt7, ptRegD], 'Tests bit 7 of D.', 8, 0);
     546  AddNew(in_BIT_7_E, 'BIT', [pt7, ptRegE], 'Tests bit 7 of E.', 8, 0);
     547  AddNew(in_BIT_7_H, 'BIT', [pt7, ptRegH], 'Tests bit 7 of H.', 8, 0);
     548  AddNew(in_BIT_7_L, 'BIT', [pt7, ptRegL], 'Tests bit 7 of L.', 8, 0);
     549  AddNew(in_BIT_7_HL_Indirect, 'BIT', [pt7, ptRegHLIndir], 'Tests bit 7 of (HL).', 12, 0);
     550  AddNew(in_BIT_7_A, 'BIT', [pt7, ptRegA], 'Tests bit 7 of A.', 8, 0);
     551  AddNew(in_RES_0_B, 'RES', [pt0, ptRegB], 'Resets bit 0 of B.', 8, 0);
     552  AddNew(in_RES_0_C, 'RES', [pt0, ptRegC], 'Resets bit 0 of C.', 8, 0);
     553  AddNew(in_RES_0_D, 'RES', [pt0, ptRegD], 'Resets bit 0 of D.', 8, 0);
     554  AddNew(in_RES_0_E, 'RES', [pt0, ptRegE], 'Resets bit 0 of E.', 8, 0);
     555  AddNew(in_RES_0_H, 'RES', [pt0, ptRegH], 'Resets bit 0 of H.', 8, 0);
     556  AddNew(in_RES_0_L, 'RES', [pt0, ptRegL], 'Resets bit 0 of L.', 8, 0);
     557  AddNew(in_RES_0_HL_Indirect, 'RES', [pt0, ptRegHLIndir], 'Resets bit 0 of (HL).', 15, 0);
     558  AddNew(in_RES_0_A, 'RES', [pt0, ptRegA], 'Resets bit 0 of A.', 8, 0);
     559  AddNew(in_RES_1_B, 'RES', [pt1, ptRegB], 'Resets bit 1 of B.', 8, 0);
     560  AddNew(in_RES_1_C, 'RES', [pt1, ptRegC], 'Resets bit 1 of C.', 8, 0);
     561  AddNew(in_RES_1_D, 'RES', [pt1, ptRegD], 'Resets bit 1 of D.', 8, 0);
     562  AddNew(in_RES_1_E, 'RES', [pt1, ptRegE], 'Resets bit 1 of E.', 8, 0);
     563  AddNew(in_RES_1_H, 'RES', [pt1, ptRegH], 'Resets bit 1 of H.', 8, 0);
     564  AddNew(in_RES_1_L, 'RES', [pt1, ptRegL], 'Resets bit 1 of L.', 8, 0);
     565  AddNew(in_RES_1_HL_Indirect, 'RES', [pt1, ptRegHLIndir], 'Resets bit 1 of (HL).', 15, 0);
     566  AddNew(in_RES_1_A, 'RES', [pt1, ptRegA], 'Resets bit 1 of A.', 8, 0);
     567  AddNew(in_RES_2_B, 'RES', [pt2, ptRegB], 'Resets bit 2 of B.', 8, 0);
     568  AddNew(in_RES_2_C, 'RES', [pt2, ptRegC], 'Resets bit 2 of C.', 8, 0);
     569  AddNew(in_RES_2_D, 'RES', [pt2, ptRegD], 'Resets bit 2 of D.', 8, 0);
     570  AddNew(in_RES_2_E, 'RES', [pt2, ptRegE], 'Resets bit 2 of E.', 8, 0);
     571  AddNew(in_RES_2_H, 'RES', [pt2, ptRegH], 'Resets bit 2 of H.', 8, 0);
     572  AddNew(in_RES_2_L, 'RES', [pt2, ptRegL], 'Resets bit 2 of L.', 8, 0);
     573  AddNew(in_RES_2_HL_Indirect, 'RES', [pt2, ptRegHLIndir], 'Resets bit 2 of (HL).', 15, 0);
     574  AddNew(in_RES_2_A, 'RES', [pt2, ptRegA], 'Resets bit 2 of A.', 8, 0);
     575  AddNew(in_RES_3_B, 'RES', [pt3, ptRegB], 'Resets bit 3 of B.', 8, 0);
     576  AddNew(in_RES_3_C, 'RES', [pt3, ptRegC], 'Resets bit 3 of C.', 8, 0);
     577  AddNew(in_RES_3_D, 'RES', [pt3, ptRegD], 'Resets bit 3 of D.', 8, 0);
     578  AddNew(in_RES_3_E, 'RES', [pt3, ptRegE], 'Resets bit 3 of E.', 8, 0);
     579  AddNew(in_RES_3_H, 'RES', [pt3, ptRegH], 'Resets bit 3 of H.', 8, 0);
     580  AddNew(in_RES_3_L, 'RES', [pt3, ptRegL], 'Resets bit 3 of L.', 8, 0);
     581  AddNew(in_RES_3_HL_Indirect, 'RES', [pt3, ptRegHLIndir], 'Resets bit 3 of (HL).', 15, 0);
     582  AddNew(in_RES_3_A, 'RES', [pt3, ptRegA], 'Resets bit 3 of A.', 8, 0);
     583  AddNew(in_RES_4_B, 'RES', [pt4, ptRegB], 'Resets bit 4 of B.', 8, 0);
     584  AddNew(in_RES_4_C, 'RES', [pt4, ptRegC], 'Resets bit 4 of C.', 8, 0);
     585  AddNew(in_RES_4_D, 'RES', [pt4, ptRegD], 'Resets bit 4 of D.', 8, 0);
     586  AddNew(in_RES_4_E, 'RES', [pt4, ptRegE], 'Resets bit 4 of E.', 8, 0);
     587  AddNew(in_RES_4_H, 'RES', [pt4, ptRegH], 'Resets bit 4 of H.', 8, 0);
     588  AddNew(in_RES_4_L, 'RES', [pt4, ptRegL], 'Resets bit 4 of L.', 8, 0);
     589  AddNew(in_RES_4_HL_Indirect, 'RES', [pt4, ptRegHLIndir], 'Resets bit 4 of (HL).', 15, 0);
     590  AddNew(in_RES_4_A, 'RES', [pt4, ptRegA], 'Resets bit 4 of A.', 8, 0);
     591  AddNew(in_RES_5_B, 'RES', [pt5, ptRegB], 'Resets bit 5 of B.', 8, 0);
     592  AddNew(in_RES_5_C, 'RES', [pt5, ptRegC], 'Resets bit 5 of C.', 8, 0);
     593  AddNew(in_RES_5_D, 'RES', [pt5, ptRegD], 'Resets bit 5 of D.', 8, 0);
     594  AddNew(in_RES_5_E, 'RES', [pt5, ptRegE], 'Resets bit 5 of E.', 8, 0);
     595  AddNew(in_RES_5_H, 'RES', [pt5, ptRegH], 'Resets bit 5 of H.', 8, 0);
     596  AddNew(in_RES_5_L, 'RES', [pt5, ptRegL], 'Resets bit 5 of L.', 8, 0);
     597  AddNew(in_RES_5_HL_Indirect, 'RES', [pt5, ptRegHLIndir], 'Resets bit 5 of (HL).', 15, 0);
     598  AddNew(in_RES_5_A, 'RES', [pt5, ptRegA], 'Resets bit 5 of A.', 8, 0);
     599  AddNew(in_RES_6_B, 'RES', [pt6, ptRegB], 'Resets bit 6 of B.', 8, 0);
     600  AddNew(in_RES_6_C, 'RES', [pt6, ptRegC], 'Resets bit 6 of C.', 8, 0);
     601  AddNew(in_RES_6_D, 'RES', [pt6, ptRegD], 'Resets bit 6 of D.', 8, 0);
     602  AddNew(in_RES_6_E, 'RES', [pt6, ptRegE], 'Resets bit 6 of E.', 8, 0);
     603  AddNew(in_RES_6_H, 'RES', [pt6, ptRegH], 'Resets bit 6 of H.', 8, 0);
     604  AddNew(in_RES_6_L, 'RES', [pt6, ptRegL], 'Resets bit 6 of L.', 8, 0);
     605  AddNew(in_RES_6_HL_Indirect, 'RES', [pt6, ptRegHLIndir], 'Resets bit 6 of (HL).', 15, 0);
     606  AddNew(in_RES_6_A, 'RES', [pt6, ptRegA], 'Resets bit 6 of A.', 8, 0);
     607  AddNew(in_RES_7_B, 'RES', [pt7, ptRegB], 'Resets bit 7 of B.', 8, 0);
     608  AddNew(in_RES_7_C, 'RES', [pt7, ptRegC], 'Resets bit 7 of C.', 8, 0);
     609  AddNew(in_RES_7_D, 'RES', [pt7, ptRegD], 'Resets bit 7 of D.', 8, 0);
     610  AddNew(in_RES_7_E, 'RES', [pt7, ptRegE], 'Resets bit 7 of E.', 8, 0);
     611  AddNew(in_RES_7_H, 'RES', [pt7, ptRegH], 'Resets bit 7 of H.', 8, 0);
     612  AddNew(in_RES_7_L, 'RES', [pt7, ptRegL], 'Resets bit 7 of L.', 8, 0);
     613  AddNew(in_RES_7_HL_Indirect, 'RES', [pt7, ptRegHLIndir], 'Resets bit 7 of (HL).', 15, 0);
     614  AddNew(in_RES_7_A, 'RES', [pt7, ptRegA], 'Resets bit 7 of A.', 8, 0);
     615  AddNew(in_SET_0_B, 'SET', [pt0, ptRegB], 'Sets bit 0 of B.', 8, 0);
     616  AddNew(in_SET_0_C, 'SET', [pt0, ptRegC], 'Sets bit 0 of C.', 8, 0);
     617  AddNew(in_SET_0_D, 'SET', [pt0, ptRegD], 'Sets bit 0 of D.', 8, 0);
     618  AddNew(in_SET_0_E, 'SET', [pt0, ptRegE], 'Sets bit 0 of E.', 8, 0);
     619  AddNew(in_SET_0_H, 'SET', [pt0, ptRegH], 'Sets bit 0 of H.', 8, 0);
     620  AddNew(in_SET_0_L, 'SET', [pt0, ptRegL], 'Sets bit 0 of L.', 8, 0);
     621  AddNew(in_SET_0_HL_Indirect, 'SET', [pt0, ptRegHLIndir], 'Sets bit 0 of (HL).', 15, 0);
     622  AddNew(in_SET_0_A, 'SET', [pt0, ptRegA], 'Sets bit 0 of A.', 8, 0);
     623  AddNew(in_SET_1_B, 'SET', [pt1, ptRegB], 'Sets bit 1 of B.', 8, 0);
     624  AddNew(in_SET_1_C, 'SET', [pt1, ptRegC], 'Sets bit 1 of C.', 8, 0);
     625  AddNew(in_SET_1_D, 'SET', [pt1, ptRegD], 'Sets bit 1 of D.', 8, 0);
     626  AddNew(in_SET_1_E, 'SET', [pt1, ptRegE], 'Sets bit 1 of E.', 8, 0);
     627  AddNew(in_SET_1_H, 'SET', [pt1, ptRegH], 'Sets bit 1 of H.', 8, 0);
     628  AddNew(in_SET_1_L, 'SET', [pt1, ptRegL], 'Sets bit 1 of L.', 8, 0);
     629  AddNew(in_SET_1_HL_Indirect, 'SET', [pt1, ptRegHLIndir], 'Sets bit 1 of (HL).', 15, 0);
     630  AddNew(in_SET_1_A, 'SET', [pt1, ptRegA], 'Sets bit 1 of A.', 8, 0);
     631  AddNew(in_SET_2_B, 'SET', [pt2, ptRegB], 'Sets bit 2 of B.', 8, 0);
     632  AddNew(in_SET_2_C, 'SET', [pt2, ptRegC], 'Sets bit 2 of C.', 8, 0);
     633  AddNew(in_SET_2_D, 'SET', [pt2, ptRegD], 'Sets bit 2 of D.', 8, 0);
     634  AddNew(in_SET_2_E, 'SET', [pt2, ptRegE], 'Sets bit 2 of E.', 8, 0);
     635  AddNew(in_SET_2_H, 'SET', [pt2, ptRegH], 'Sets bit 2 of H.', 8, 0);
     636  AddNew(in_SET_2_L, 'SET', [pt2, ptRegL], 'Sets bit 2 of L.', 8, 0);
     637  AddNew(in_SET_2_HL_Indirect, 'SET', [pt2, ptRegHLIndir], 'Sets bit 2 of (HL).', 15, 0);
     638  AddNew(in_SET_2_A, 'SET', [pt2, ptRegA], 'Sets bit 2 of A.', 8, 0);
     639  AddNew(in_SET_3_B, 'SET', [pt3, ptRegB], 'Sets bit 3 of B.', 8, 0);
     640  AddNew(in_SET_3_C, 'SET', [pt3, ptRegC], 'Sets bit 3 of C.', 8, 0);
     641  AddNew(in_SET_3_D, 'SET', [pt3, ptRegD], 'Sets bit 3 of D.', 8, 0);
     642  AddNew(in_SET_3_E, 'SET', [pt3, ptRegE], 'Sets bit 3 of E.', 8, 0);
     643  AddNew(in_SET_3_H, 'SET', [pt3, ptRegH], 'Sets bit 3 of H.', 8, 0);
     644  AddNew(in_SET_3_L, 'SET', [pt3, ptRegL], 'Sets bit 3 of L.', 8, 0);
     645  AddNew(in_SET_3_HL_Indirect, 'SET', [pt3, ptRegHLIndir], 'Sets bit 3 of (HL).', 15, 0);
     646  AddNew(in_SET_3_A, 'SET', [pt3, ptRegA], 'Sets bit 3 of A.', 8, 0);
     647  AddNew(in_SET_4_B, 'SET', [pt4, ptRegB], 'Sets bit 4 of B.', 8, 0);
     648  AddNew(in_SET_4_C, 'SET', [pt4, ptRegC], 'Sets bit 4 of C.', 8, 0);
     649  AddNew(in_SET_4_D, 'SET', [pt4, ptRegD], 'Sets bit 4 of D.', 8, 0);
     650  AddNew(in_SET_4_E, 'SET', [pt4, ptRegE], 'Sets bit 4 of E.', 8, 0);
     651  AddNew(in_SET_4_H, 'SET', [pt4, ptRegH], 'Sets bit 4 of H.', 8, 0);
     652  AddNew(in_SET_4_L, 'SET', [pt4, ptRegL], 'Sets bit 4 of L.', 8, 0);
     653  AddNew(in_SET_4_HL_Indirect, 'SET', [pt4, ptRegHLIndir], 'Sets bit 4 of (HL).', 15, 0);
     654  AddNew(in_SET_4_A, 'SET', [pt4, ptRegA], 'Sets bit 4 of A.', 8, 0);
     655  AddNew(in_SET_5_B, 'SET', [pt5, ptRegB], 'Sets bit 5 of B.', 8, 0);
     656  AddNew(in_SET_5_C, 'SET', [pt5, ptRegC], 'Sets bit 5 of C.', 8, 0);
     657  AddNew(in_SET_5_D, 'SET', [pt5, ptRegD], 'Sets bit 5 of D.', 8, 0);
     658  AddNew(in_SET_5_E, 'SET', [pt5, ptRegE], 'Sets bit 5 of E.', 8, 0);
     659  AddNew(in_SET_5_H, 'SET', [pt5, ptRegH], 'Sets bit 5 of H.', 8, 0);
     660  AddNew(in_SET_5_L, 'SET', [pt5, ptRegL], 'Sets bit 5 of L.', 8, 0);
     661  AddNew(in_SET_5_HL_Indirect, 'SET', [pt5, ptRegHLIndir], 'Sets bit 5 of (HL).', 15, 0);
     662  AddNew(in_SET_5_A, 'SET', [pt5, ptRegA], 'Sets bit 5 of A.', 8, 0);
     663  AddNew(in_SET_6_B, 'SET', [pt6, ptRegB], 'Sets bit 6 of B.', 8, 0);
     664  AddNew(in_SET_6_C, 'SET', [pt6, ptRegC], 'Sets bit 6 of C.', 8, 0);
     665  AddNew(in_SET_6_D, 'SET', [pt6, ptRegD], 'Sets bit 6 of D.', 8, 0);
     666  AddNew(in_SET_6_E, 'SET', [pt6, ptRegE], 'Sets bit 6 of E.', 8, 0);
     667  AddNew(in_SET_6_H, 'SET', [pt6, ptRegH], 'Sets bit 6 of H.', 8, 0);
     668  AddNew(in_SET_6_L, 'SET', [pt6, ptRegL], 'Sets bit 6 of L.', 8, 0);
     669  AddNew(in_SET_6_HL_Indirect, 'SET', [pt6, ptRegHLIndir], 'Sets bit 6 of (HL).', 15, 0);
     670  AddNew(in_SET_6_A, 'SET', [pt6, ptRegA], 'Sets bit 6 of A.', 8, 0);
     671  AddNew(in_SET_7_B, 'SET', [pt7, ptRegB], 'Sets bit 7 of B.', 8, 0);
     672  AddNew(in_SET_7_C, 'SET', [pt7, ptRegC], 'Sets bit 7 of C.', 8, 0);
     673  AddNew(in_SET_7_D, 'SET', [pt7, ptRegD], 'Sets bit 7 of D.', 8, 0);
     674  AddNew(in_SET_7_E, 'SET', [pt7, ptRegE], 'Sets bit 7 of E.', 8, 0);
     675  AddNew(in_SET_7_H, 'SET', [pt7, ptRegH], 'Sets bit 7 of H.', 8, 0);
     676  AddNew(in_SET_7_L, 'SET', [pt7, ptRegL], 'Sets bit 7 of L.', 8, 0);
     677  AddNew(in_SET_7_HL_Indirect, 'SET', [pt7, ptRegHLIndir], 'Sets bit 7 of (HL).', 15, 0);
     678  AddNew(in_SET_7_A, 'SET', [pt7, ptRegA], 'Sets bit 7 of A.', 8, 0);
     679  AddNew(in_ADD_IX_BC, 'ADD', [ptRegIX, ptRegBC], 'The value of BC is added to IX.', 15, 0);
     680  AddNew(in_ADD_IX_DE, 'ADD', [ptRegIX, ptRegDE], 'The value of DE is added to IX.', 15, 0);
     681  AddNew(in_LD_IX_NN, 'LD', [ptRegIX, ptNumberWord], 'Loads nn into register IX.', 14, 0);
     682  AddNew(in_LD_NN_Indirect_IX, 'LD', [ptNumberWordIndir, ptRegIX], 'Stores IX into the memory location pointed to by nn.', 20, 0);
     683  AddNew(in_INC_IX, 'INC', [ptRegIX], 'Adds one to IX.', 10, 0);
     684  AddNew(in_ADD_IX_IX, 'ADD', [ptRegIX, ptRegIX], 'The value of IX is added to IX.', 15, 0);
     685  AddNew(in_LD_IX_NN_Indirect, 'LD', [ptRegIX, ptNumberWordIndir], 'Loads the value pointed to by nn into IX.', 20, 0);
     686  AddNew(in_DEC_IX, 'DEC', [ptRegIX], 'Subtracts one from IX.', 10, 0);
     687  AddNew(in_INC_IX_Plus_D_Indirect, 'INC', [], 'Adds one to the memory location pointed to by IX plus d.', 23, 0);
     688  AddNew(in_DEC_IX_Plus_D_Indirect, 'DEC', [], 'Subtracts one from the memory location pointed to by IX plus d.', 23, 0);
     689  AddNew(in_LD_IX_Plus_D_Indirect_N, 'LD', [ptNumberByte], 'Stores n to the memory location pointed to by IX plus d.', 19, 0);
     690  AddNew(in_ADD_IX_SP, 'ADD', [ptRegIX, ptRegSP], 'The value of SP is added to IX.', 15, 0);
     691  AddNew(in_LD_B_IX_Plus_D_Indirect, 'LD', [ptRegB], 'Loads the value pointed to by IX plus d into B.', 19, 0);
     692  AddNew(in_LD_C_IX_Plus_D_Indirect, 'LD', [ptRegC], 'Loads the value pointed to by IX plus d into C.', 19, 0);
     693  AddNew(in_LD_D_IX_Plus_D_Indirect, 'LD', [ptRegD], 'Loads the value pointed to by IX plus d into D.', 19, 0);
     694  AddNew(in_LD_E_IX_Plus_D_Indirect, 'LD', [ptRegE], 'Loads the value pointed to by IX plus d into E.', 19, 0);
     695  AddNew(in_LD_H_IX_Plus_D_Indirect, 'LD', [ptRegH], 'Loads the value pointed to by IX plus d into H.', 19, 0);
     696  AddNew(in_LD_L_IX_Plus_D_Indirect, 'LD', [ptRegL], 'Loads the value pointed to by IX plus d into L.', 19, 0);
     697  AddNew(in_LD_IX_Plus_D_Indirect_B, 'LD', [ptRegB], 'Stores B to the memory location pointed to by IX plus d.', 19, 0);
     698  AddNew(in_LD_IX_Plus_D_Indirect_C, 'LD', [ptRegC], 'Stores C to the memory location pointed to by IX plus d.', 19, 0);
     699  AddNew(in_LD_IX_Plus_D_Indirect_D, 'LD', [ptRegD], 'Stores D to the memory location pointed to by IX plus d.', 19, 0);
     700  AddNew(in_LD_IX_Plus_D_Indirect_E, 'LD', [ptRegE], 'Stores E to the memory location pointed to by IX plus d.', 19, 0);
     701  AddNew(in_LD_IX_Plus_D_Indirect_H, 'LD', [ptRegH], 'Stores H to the memory location pointed to by IX plus d.', 19, 0);
     702  AddNew(in_LD_IX_Plus_D_Indirect_L, 'LD', [ptRegL], 'Stores L to the memory location pointed to by IX plus d.', 19, 0);
     703  AddNew(in_LD_IX_Plus_D_Indirect_A, 'LD', [ptRegA], 'Stores A to the memory location pointed to by IX plus d.', 19, 0);
     704  AddNew(in_LD_A_IX_Plus_D_Indirect, 'LD', [ptRegA], 'Loads the value pointed to by IX plus d into A.', 19, 0);
     705  AddNew(in_ADD_A_IX_Plus_D_Indirect, 'ADD', [ptRegA], 'Adds the value pointed to by IX plus d to A.', 19, 0);
     706  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);
     707  AddNew(in_SUB_IX_Plus_D_Indirect, 'SUB', [], 'Subtracts the value pointed to by IX plus d from A.', 19, 0);
     708  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);
     709  AddNew(in_AND_IX_Plus_D_Indirect, 'AND', [], 'Bitwise AND on A with the value pointed to by IX plus d.', 19, 0);
     710  AddNew(in_XOR_IX_Plus_D_Indirect, 'XOR', [], 'Bitwise XOR on A with the value pointed to by IX plus d.', 19, 0);
     711  AddNew(in_OR_IX_Plus_D_Indirect, 'OR', [], 'Bitwise OR on A with the value pointed to by IX plus d.', 19, 0);
     712  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);
     713  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);
     714  AddNew(in_EX_SP_Indirect_IX, 'EX', [ptRegSPIndir, ptRegIX], 'Exchanges (SP) with IXL, and (SP+1) with IXH.', 23, 0);
     715  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);
     716  AddNew(in_JP_IX_Indirect, 'JP', [], 'Loads the value of IX into PC.', 8, 0);
     717  AddNew(in_LD_SP_IX, 'LD', [ptRegSP, ptRegIX], 'Loads the value of IX into SP.', 10, 0);
     718  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);
     719  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);
     720  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);
     721  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);
     722  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);
     723  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);
     724  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);
     725  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);
     726  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);
     727  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);
     728  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);
     729  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);
     730  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);
     731  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);
     732  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);
     733  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);
     734  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);
     735  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);
     736  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);
     737  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);
     738  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);
     739  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);
     740  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);
     741  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);
     742  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);
     743  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);
     744  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);
     745  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);
     746  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);
     747  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);
     748  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);
     749  AddNew(in_ADD_IY_BC, 'ADD', [ptRegIY, ptRegBC], 'The value of BC is added to IY.', 15, 0);
     750  AddNew(in_ADD_IY_DE, 'ADD', [ptRegIY, ptRegDE], 'The value of DE is added to IY.', 15, 0);
     751  AddNew(in_LD_IY_NN, 'LD', [ptRegIY, ptNumberWord], 'Loads nn into register IY.', 14, 0);
     752  AddNew(in_LD_NN_Indirect_IY, 'LD', [ptNumberWordIndir, ptRegIY], 'Stores IY into the memory location pointed to by nn.', 20, 0);
     753  AddNew(in_INC_IY, 'INC', [ptRegIY], 'Adds one to IY.', 10, 0);
     754  AddNew(in_ADD_IY_IY, 'ADD', [ptRegIY, ptRegIY], 'The value of IY is added to IY.', 15, 0);
     755  AddNew(in_LD_IY_NN_Indirect, 'LD', [ptRegIY, ptNumberWordIndir], 'Loads the value pointed to by nn into IY.', 20, 0);
     756  AddNew(in_DEC_IY, 'DEC', [ptRegIY], 'Subtracts one from IY.', 10, 0);
     757  AddNew(in_INC_IY_Plus_D_Indirect, 'INC', [], 'Adds one to the memory location pointed to by IY plus d.', 23, 0);
     758  AddNew(in_DEC_IY_Plus_D_Indirect, 'DEC', [], 'Subtracts one from the memory location pointed to by IY plus d.', 23, 0);
     759  AddNew(in_LD_IY_Plus_D_Indirect_N, 'LD', [ptNumberByte], 'Stores n to the memory location pointed to by IY plus d.', 19, 0);
     760  AddNew(in_ADD_IY_SP, 'ADD', [ptRegIY, ptRegSP], 'The value of SP is added to IY.', 15, 0);
     761  AddNew(in_LD_B_IY_Plus_D_Indirect, 'LD', [ptRegB], 'Loads the value pointed to by IY plus d into B.', 19, 0);
     762  AddNew(in_LD_C_IY_Plus_D_Indirect, 'LD', [ptRegC], 'Loads the value pointed to by IY plus d into C.', 19, 0);
     763  AddNew(in_LD_D_IY_Plus_D_Indirect, 'LD', [ptRegD], 'Loads the value pointed to by IY plus d into D.', 19, 0);
     764  AddNew(in_LD_E_IY_Plus_D_Indirect, 'LD', [ptRegE], 'Loads the value pointed to by IY plus d into E.', 19, 0);
     765  AddNew(in_LD_H_IY_Plus_D_Indirect, 'LD', [ptRegH], 'Loads the value pointed to by IY plus d into H.', 19, 0);
     766  AddNew(in_LD_L_IY_Plus_D_Indirect, 'LD', [ptRegL], 'Loads the value pointed to by IY plus d into L.', 19, 0);
     767  AddNew(in_LD_IY_Plus_D_Indirect_B, 'LD', [ptRegB], 'Stores B to the memory location pointed to by IY plus d.', 19, 0);
     768  AddNew(in_LD_IY_Plus_D_Indirect_C, 'LD', [ptRegC], 'Stores C to the memory location pointed to by IY plus d.', 19, 0);
     769  AddNew(in_LD_IY_Plus_D_Indirect_D, 'LD', [ptRegD], 'Stores D to the memory location pointed to by IY plus d.', 19, 0);
     770  AddNew(in_LD_IY_Plus_D_Indirect_E, 'LD', [ptRegE], 'Stores E to the memory location pointed to by IY plus d.', 19, 0);
     771  AddNew(in_LD_IY_Plus_D_Indirect_H, 'LD', [ptRegH], 'Stores H to the memory location pointed to by IY plus d.', 19, 0);
     772  AddNew(in_LD_IY_Plus_D_Indirect_L, 'LD', [ptRegL], 'Stores L to the memory location pointed to by IY plus d.', 19, 0);
     773  AddNew(in_LD_IY_Plus_D_Indirect_A, 'LD', [ptRegA], 'Stores A to the memory location pointed to by IY plus d.', 19, 0);
     774  AddNew(in_LD_A_IY_Plus_D_Indirect, 'LD', [ptRegA], 'Loads the value pointed to by IY plus d into A.', 19, 0);
     775  AddNew(in_ADD_A_IY_Plus_D_Indirect, 'ADD', [ptRegA], 'Adds the value pointed to by IY plus d to A.', 19, 0);
     776  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);
     777  AddNew(in_SUB_IY_Plus_D_Indirect, 'SUB', [], 'Subtracts the value pointed to by IY plus d from A.', 19, 0);
     778  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);
     779  AddNew(in_AND_IY_Plus_D_Indirect, 'AND', [], 'Bitwise AND on A with the value pointed to by IY plus d.', 19, 0);
     780  AddNew(in_XOR_IY_Plus_D_Indirect, 'XOR', [], 'Bitwise XOR on A with the value pointed to by IY plus d.', 19, 0);
     781  AddNew(in_OR_IY_Plus_D_Indirect, 'OR', [], 'Bitwise OR on A with the value pointed to by IY plus d.', 19, 0);
     782  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);
     783  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);
     784  AddNew(in_EX_SP_Indirect_IY, 'EX', [ptRegSPIndir, ptRegIY], 'Exchanges (SP) with IYL, and (SP+1) with IYH.', 23, 0);
     785  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);
     786  AddNew(in_JP_IY_Indirect, 'JP', [], 'Loads the value of IY into PC.', 8, 0);
     787  AddNew(in_LD_SP_IY, 'LD', [ptRegSP, ptRegIY], 'Loads the value of IY into SP.', 10, 0);
     788  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);
     789  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);
     790  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);
     791  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);
     792  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);
     793  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);
     794  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);
     795  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);
     796  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);
     797  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);
     798  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);
     799  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);
     800  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);
     801  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);
     802  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);
     803  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);
     804  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);
     805  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);
     806  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);
     807  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);
     808  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);
     809  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);
     810  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);
     811  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);
     812  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);
     813  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);
     814  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);
     815  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);
     816  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);
     817  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);
     818  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);
    153819end;
    154820
  • trunk/Z80/Z80Instructions.pas

    r6 r7  
    1010
    1111  TInstruction = (
    12     in_NOP = 0,
    13     in_LD_BC_nn = $1,
    14     in_LD_BC_Indirect_A = $2,
    15     in_INC_BC = $3,
    16     in_INC_B = $4,
    17     in_DEC_B = $5,
    18     in_LD_B_n = $6,
    19     in_RLCA = $7,
    20     in_ADD_HL_BC = $9,
    21     in_DJNZ_d = $10,
    22     in_LD_DE_nn = $11,
    23     in_JR_d = $18,
    24     in_JR_NZ_d = $20,
    25     in_LD_HL_nn = $21,
     12    in_NOP = $00,
     13    in_LD_BC_NN = $01,
     14    in_LD_BC_Indirect_A = $02,
     15    in_INC_BC = $03,
     16    in_INC_B = $04,
     17    in_DEC_B = $05,
     18    in_LD_B_N = $06,
     19    in_RLCA = $07,
     20    in_EX_AF_AF_Pair = $08,
     21    in_ADD_HL_BC = $09,
     22    in_LD_A_BC_Indirect = $0A,
     23    in_DEC_BC = $0B,
     24    in_INC_C = $0C,
     25    in_DEC_C = $0D,
     26    in_LD_C_N = $0E,
     27    in_RRCA = $0F,
     28    in_DJNZ_D = $10,
     29    in_LD_DE_NN = $11,
     30    in_LD_DE_Indirect_A = $12,
     31    in_INC_DE = $13,
     32    in_INC_D = $14,
     33    in_DEC_D = $15,
     34    in_LD_D_N = $16,
     35    in_RLA = $17,
     36    in_JR_D = $18,
     37    in_ADD_HL_DE = $19,
     38    in_LD_A_DE_Indirect = $1A,
     39    in_DEC_DE = $1B,
     40    in_INC_E = $1C,
     41    in_DEC_E = $1D,
     42    in_LD_E_N = $1E,
     43    in_RRA = $1F,
     44    in_JR_NZ_D = $20,
     45    in_LD_HL_NN = $21,
     46    in_LD_NN_Indirect_HL = $22,
    2647    in_INC_HL = $23,
    27     in_LD_HL_Indirect_nn = $2a,
    28     in_DEC_HL = $2b,
    29     in_JR_NC_d = $30,
    30     in_LD_SP_nn = $31,
    31     in_LD_nn_Indirect_A = $32,
    32     in_LD_HL_Indirect_n = $36,
    33     in_LD_A_nn_Indirect = $3a,
    34     in_LD_A_n = $3e,
     48    in_INC_H = $24,
     49    in_DEC_H = $25,
     50    in_LD_H_N = $26,
     51    in_DAA = $27,
     52    in_JR_Z_D = $28,
     53    in_ADD_HL_HL = $29,
     54    in_LD_HL_NN_Indirect = $2A,
     55    in_DEC_HL = $2B,
     56    in_INC_L = $2C,
     57    in_DEC_L = $2D,
     58    in_LD_L_N = $2E,
     59    in_CPL = $2F,
     60    in_JR_NC_D = $30,
     61    in_LD_SP_NN = $31,
     62    in_LD_NN_Indirect_A = $32,
     63    in_INC_SP = $33,
     64    in_INC_HL_Indirect = $34,
     65    in_DEC_HL_Indirect = $35,
     66    in_LD_HL_Indirect_N = $36,
     67    in_SCF = $37,
     68    in_JR_C_D = $38,
     69    in_ADD_HL_SP = $39,
     70    in_LD_A_NN_Indirect = $3A,
     71    in_DEC_SP = $3B,
     72    in_INC_A = $3C,
     73    in_DEC_A = $3D,
     74    in_LD_A_N = $3E,
     75    in_CCF = $3F,
     76    in_LD_B_B = $40,
     77    in_LD_B_C = $41,
     78    in_LD_B_D = $42,
     79    in_LD_B_E = $43,
     80    in_LD_B_H = $44,
     81    in_LD_B_L = $45,
     82    in_LD_B_HL_Indirect = $46,
    3583    in_LD_B_A = $47,
    36     in_LD_C_HL_Indirect = $4e,
    37     in_LD_C_A = $4f,
     84    in_LD_C_B = $48,
     85    in_LD_C_C = $49,
     86    in_LD_C_D = $4A,
     87    in_LD_C_E = $4B,
     88    in_LD_C_H = $4C,
     89    in_LD_C_L = $4D,
     90    in_LD_C_HL_Indirect = $4E,
     91    in_LD_C_A = $4F,
     92    in_LD_D_B = $50,
     93    in_LD_D_C = $51,
     94    in_LD_D_D = $52,
     95    in_LD_D_E = $53,
     96    in_LD_D_H = $54,
     97    in_LD_D_L = $55,
     98    in_LD_D_HL_Indirect = $56,
     99    in_LD_D_A = $57,
     100    in_LD_E_B = $58,
     101    in_LD_E_C = $59,
     102    in_LD_E_D = $5A,
     103    in_LD_E_E = $5B,
     104    in_LD_E_H = $5C,
     105    in_LD_E_L = $5D,
     106    in_LD_E_HL_Indirect = $5E,
     107    in_LD_E_A = $5F,
    38108    in_LD_H_B = $60,
     109    in_LD_H_C = $61,
     110    in_LD_H_D = $62,
     111    in_LD_H_E = $63,
     112    in_LD_H_H = $64,
     113    in_LD_H_L = $65,
     114    in_LD_H_HL_Indirect = $66,
     115    in_LD_H_A = $67,
     116    in_LD_L_B = $68,
    39117    in_LD_L_C = $69,
     118    in_LD_L_D = $6A,
     119    in_LD_L_E = $6B,
     120    in_LD_L_H = $6C,
     121    in_LD_L_L = $6D,
     122    in_LD_L_HL_Indirect = $6E,
     123    in_LD_L_A = $6F,
     124    in_LD_HL_Indirect_B = $70,
     125    in_LD_HL_Indirect_C = $71,
    40126    in_LD_HL_Indirect_D = $72,
    41127    in_LD_HL_Indirect_E = $73,
     128    in_LD_HL_Indirect_H = $74,
     129    in_LD_HL_Indirect_L = $75,
    42130    in_HALT = $76,
     131    in_LD_HL_Indirect_A = $77,
     132    in_LD_A_B = $78,
    43133    in_LD_A_C = $79,
    44     in_LD_A_HL_Indirect = $7e,
    45     in_XOR_B = $a8,
    46     in_XOR_A = $af,
    47     in_OR_A = $b7,
    48     in_CP_D = $ba,
    49     in_CP_E = $bb,
    50     in_JP_nn = $c3,
    51     in_PUSH_BC = $c5,
    52     in_RST_00 = $c7,
    53     in_RET_Z = $c8,
    54     in_RET = $c9,
    55     in_JP_ZN_nn = $ca,
    56     inPrefixCb = $cb,
    57     in_CALL_nn = $cd,
    58     in_RST_08 = $cf,
    59     in_OUT_N_A = $d3,
    60     in_PUSH_DE = $d5,
    61     in_RST_10 = $d7,
    62     inPrefixDd = $dd,
    63     in_RST_18 = $df,
    64     in_RST_20 = $e0,
    65     in_PUSH_HL = $e5,
    66     in_AND_n = $e6,
    67     in_EX_DE_HL = $eb,
    68     inPrefixEd = $ed,
    69     in_RST_28 = $ef,
    70     in_DI = $f3,
    71     in_PUSH_AF = $f5,
    72     in_RST_30 = $f7,
    73     in_EI = $fb,
    74     inPrefixFd = $fd,
    75     in_CP_N = $fe,
    76     in_RST_38 = $ff,
    77     // CB
    78     // ED
    79     in_SBC_HL_DE = $252,
    80     in_IM1 = $256
    81     // DD
    82     // FD
     134    in_LD_A_D = $7A,
     135    in_LD_A_E = $7B,
     136    in_LD_A_H = $7C,
     137    in_LD_A_L = $7D,
     138    in_LD_A_HL_Indirect = $7E,
     139    in_LD_A_A = $7F,
     140    in_ADD_A_B = $80,
     141    in_ADD_A_C = $81,
     142    in_ADD_A_D = $82,
     143    in_ADD_A_E = $83,
     144    in_ADD_A_H = $84,
     145    in_ADD_A_L = $85,
     146    in_ADD_A_HL_Indirect = $86,
     147    in_ADD_A_A = $87,
     148    in_ADC_A_B = $88,
     149    in_ADC_A_C = $89,
     150    in_ADC_A_D = $8A,
     151    in_ADC_A_E = $8B,
     152    in_ADC_A_H = $8C,
     153    in_ADC_A_L = $8D,
     154    in_ADC_A_HL_Indirect = $8E,
     155    in_ADC_A_A = $8F,
     156    in_SUB_B = $90,
     157    in_SUB_C = $91,
     158    in_SUB_D = $92,
     159    in_SUB_E = $93,
     160    in_SUB_H = $94,
     161    in_SUB_L = $95,
     162    in_SUB_HL_Indirect = $96,
     163    in_SUB_A = $97,
     164    in_SBC_A_B = $98,
     165    in_SBC_A_C = $99,
     166    in_SBC_A_D = $9A,
     167    in_SBC_A_E = $9B,
     168    in_SBC_A_H = $9C,
     169    in_SBC_A_L = $9D,
     170    in_SBC_A_HL_Indirect = $9E,
     171    in_SBC_A_A = $9F,
     172    in_AND_B = $A0,
     173    in_AND_C = $A1,
     174    in_AND_D = $A2,
     175    in_AND_E = $A3,
     176    in_AND_H = $A4,
     177    in_AND_L = $A5,
     178    in_AND_HL_Indirect = $A6,
     179    in_AND_A = $A7,
     180    in_XOR_B = $A8,
     181    in_XOR_C = $A9,
     182    in_XOR_D = $AA,
     183    in_XOR_E = $AB,
     184    in_XOR_H = $AC,
     185    in_XOR_L = $AD,
     186    in_XOR_HL_Indirect = $AE,
     187    in_XOR_A = $AF,
     188    in_OR_B = $B0,
     189    in_OR_C = $B1,
     190    in_OR_D = $B2,
     191    in_OR_E = $B3,
     192    in_OR_H = $B4,
     193    in_OR_L = $B5,
     194    in_OR_HL_Indirect = $B6,
     195    in_OR_A = $B7,
     196    in_CP_B = $B8,
     197    in_CP_C = $B9,
     198    in_CP_D = $BA,
     199    in_CP_E = $BB,
     200    in_CP_H = $BC,
     201    in_CP_L = $BD,
     202    in_CP_HL_Indirect = $BE,
     203    in_CP_A = $BF,
     204    in_RET_NZ = $C0,
     205    in_POP_BC = $C1,
     206    in_JP_NZ_NN = $C2,
     207    in_JP_NN = $C3,
     208    in_CALL_NZ_NN = $C4,
     209    in_PUSH_BC = $C5,
     210    in_ADD_A_N = $C6,
     211    in_RST_00H = $C7,
     212    in_RET_Z = $C8,
     213    in_RET = $C9,
     214    in_JP_Z_NN = $CA,
     215    in_CALL_Z_NN = $CC,
     216    in_CALL_NN = $CD,
     217    in_ADC_A_N = $CE,
     218    in_RST_08H = $CF,
     219    in_RET_NC = $D0,
     220    in_POP_DE = $D1,
     221    in_JP_NC_NN = $D2,
     222    in_OUT_N_Indirect_A = $D3,
     223    in_CALL_NC_NN = $D4,
     224    in_PUSH_DE = $D5,
     225    in_SUB_N = $D6,
     226    in_RST_10H = $D7,
     227    in_RET_C = $D8,
     228    in_EXX = $D9,
     229    in_JP_C_NN = $DA,
     230    in_IN_A_N_Indirect = $DB,
     231    in_CALL_C_NN = $DC,
     232    in_SBC_A_N = $DE,
     233    in_RST_18H = $DF,
     234    in_RET_PO = $E0,
     235    in_POP_HL = $E1,
     236    in_JP_PO_NN = $E2,
     237    in_EX_SP_Indirect_HL = $E3,
     238    in_CALL_PO_NN = $E4,
     239    in_PUSH_HL = $E5,
     240    in_AND_N = $E6,
     241    in_RST_20H = $E7,
     242    in_RET_PE = $E8,
     243    in_JP_HL_Indirect = $E9,
     244    in_JP_PE_NN = $EA,
     245    in_EX_DE_HL = $EB,
     246    in_CALL_PE_NN = $EC,
     247    in_XOR_N = $EE,
     248    in_RST_28H = $EF,
     249    in_RET_P = $F0,
     250    in_POP_AF = $F1,
     251    in_JP_P_NN = $F2,
     252    in_DI = $F3,
     253    in_CALL_P_NN = $F4,
     254    in_PUSH_AF = $F5,
     255    in_OR_N = $F6,
     256    in_RST_30H = $F7,
     257    in_RET_M = $F8,
     258    in_LD_SP_HL = $F9,
     259    in_JP_M_NN = $FA,
     260    in_EI = $FB,
     261    in_CALL_M_NN = $FC,
     262    in_CP_N = $FE,
     263    in_RST_38H = $FF,
     264    in_IN_B_C_Indirect = $340,
     265    in_OUT_C_Indirect_B = $341,
     266    in_SBC_HL_BC = $342,
     267    in_LD_NN_Indirect_BC = $343,
     268    in_NEG = $344,
     269    in_RETN = $345,
     270    in_IM_0 = $346,
     271    in_LD_I_A = $347,
     272    in_IN_C_C_Indirect = $348,
     273    in_OUT_C_Indirect_C = $349,
     274    in_ADC_HL_BC = $34A,
     275    in_LD_BC_NN_Indirect = $34B,
     276    in_RETI = $34D,
     277    in_LD_R_A = $34F,
     278    in_IN_D_C_Indirect = $350,
     279    in_OUT_C_Indirect_D = $351,
     280    in_SBC_HL_DE = $352,
     281    in_LD_NN_Indirect_DE = $353,
     282    in_IM_1 = $356,
     283    in_LD_A_I = $357,
     284    in_IN_E_C_Indirect = $358,
     285    in_OUT_C_Indirect_E = $359,
     286    in_ADC_HL_DE = $35A,
     287    in_LD_DE_NN_Indirect = $35B,
     288    in_IM_2 = $35E,
     289    in_LD_A_R = $35F,
     290    in_IN_H_C_Indirect = $360,
     291    in_OUT_C_Indirect_H = $361,
     292    in_SBC_HL_HL = $362,
     293    in_RRD = $367,
     294    in_IN_L_C_Indirect = $368,
     295    in_OUT_C_Indirect_L = $369,
     296    in_ADC_HL_HL = $36A,
     297    in_RLD = $36F,
     298    in_SBC_HL_SP = $372,
     299    in_LD_NN_Indirect_SP = $373,
     300    in_IN_A_C_Indirect = $378,
     301    in_OUT_C_Indirect_A = $379,
     302    in_ADC_HL_SP = $37A,
     303    in_LD_SP_NN_Indirect = $37B,
     304    in_LDI = $3A0,
     305    in_CPI = $3A1,
     306    in_INI = $3A2,
     307    in_OUTI = $3A3,
     308    in_LDD = $3A8,
     309    in_CPD = $3A9,
     310    in_IND = $3AA,
     311    in_OUTD = $3AB,
     312    in_LDIR = $3B0,
     313    in_CPIR = $3B1,
     314    in_INIR = $3B2,
     315    in_OTIR = $3B3,
     316    in_LDDR = $3B8,
     317    in_CPDR = $3B9,
     318    in_INDR = $3BA,
     319    in_OTDR = $3BB,
     320    in_RLC_B = $100,
     321    in_RLC_C = $101,
     322    in_RLC_D = $102,
     323    in_RLC_E = $103,
     324    in_RLC_H = $104,
     325    in_RLC_L = $105,
     326    in_RLC_HL_Indirect = $106,
     327    in_RLC_A = $107,
     328    in_RRC_B = $108,
     329    in_RRC_C = $109,
     330    in_RRC_D = $10A,
     331    in_RRC_E = $10B,
     332    in_RRC_H = $10C,
     333    in_RRC_L = $10D,
     334    in_RRC_HL_Indirect = $10E,
     335    in_RRC_A = $10F,
     336    in_RL_B = $110,
     337    in_RL_C = $111,
     338    in_RL_D = $112,
     339    in_RL_E = $113,
     340    in_RL_H = $114,
     341    in_RL_L = $115,
     342    in_RL_HL_Indirect = $116,
     343    in_RL_A = $117,
     344    in_RR_B = $118,
     345    in_RR_C = $119,
     346    in_RR_D = $11A,
     347    in_RR_E = $11B,
     348    in_RR_H = $11C,
     349    in_RR_L = $11D,
     350    in_RR_HL_Indirect = $11E,
     351    in_RR_A = $11F,
     352    in_SLA_B = $120,
     353    in_SLA_C = $121,
     354    in_SLA_D = $122,
     355    in_SLA_E = $123,
     356    in_SLA_H = $124,
     357    in_SLA_L = $125,
     358    in_SLA_HL_Indirect = $126,
     359    in_SLA_A = $127,
     360    in_SRA_B = $128,
     361    in_SRA_C = $129,
     362    in_SRA_D = $12A,
     363    in_SRA_E = $12B,
     364    in_SRA_H = $12C,
     365    in_SRA_L = $12D,
     366    in_SRA_HL_Indirect = $12E,
     367    in_SRA_A = $12F,
     368    in_SRL_B = $138,
     369    in_SRL_C = $139,
     370    in_SRL_D = $13A,
     371    in_SRL_E = $13B,
     372    in_SRL_H = $13C,
     373    in_SRL_L = $13D,
     374    in_SRL_HL_Indirect = $13E,
     375    in_SRL_A = $13F,
     376    in_BIT_0_B = $140,
     377    in_BIT_0_C = $141,
     378    in_BIT_0_D = $142,
     379    in_BIT_0_E = $143,
     380    in_BIT_0_H = $144,
     381    in_BIT_0_L = $145,
     382    in_BIT_0_HL_Indirect = $146,
     383    in_BIT_0_A = $147,
     384    in_BIT_1_B = $148,
     385    in_BIT_1_C = $149,
     386    in_BIT_1_D = $14A,
     387    in_BIT_1_E = $14B,
     388    in_BIT_1_H = $14C,
     389    in_BIT_1_L = $14D,
     390    in_BIT_1_HL_Indirect = $14E,
     391    in_BIT_1_A = $14F,
     392    in_BIT_2_B = $150,
     393    in_BIT_2_C = $151,
     394    in_BIT_2_D = $152,
     395    in_BIT_2_E = $153,
     396    in_BIT_2_H = $154,
     397    in_BIT_2_L = $155,
     398    in_BIT_2_HL_Indirect = $156,
     399    in_BIT_2_A = $157,
     400    in_BIT_3_B = $158,
     401    in_BIT_3_C = $159,
     402    in_BIT_3_D = $15A,
     403    in_BIT_3_E = $15B,
     404    in_BIT_3_H = $15C,
     405    in_BIT_3_L = $15D,
     406    in_BIT_3_HL_Indirect = $15E,
     407    in_BIT_3_A = $15F,
     408    in_BIT_4_B = $160,
     409    in_BIT_4_C = $161,
     410    in_BIT_4_D = $162,
     411    in_BIT_4_E = $163,
     412    in_BIT_4_H = $164,
     413    in_BIT_4_L = $165,
     414    in_BIT_4_HL_Indirect = $166,
     415    in_BIT_4_A = $167,
     416    in_BIT_5_B = $168,
     417    in_BIT_5_C = $169,
     418    in_BIT_5_D = $16A,
     419    in_BIT_5_E = $16B,
     420    in_BIT_5_H = $16C,
     421    in_BIT_5_L = $16D,
     422    in_BIT_5_HL_Indirect = $16E,
     423    in_BIT_5_A = $16F,
     424    in_BIT_6_B = $170,
     425    in_BIT_6_C = $171,
     426    in_BIT_6_D = $172,
     427    in_BIT_6_E = $173,
     428    in_BIT_6_H = $174,
     429    in_BIT_6_L = $175,
     430    in_BIT_6_HL_Indirect = $176,
     431    in_BIT_6_A = $177,
     432    in_BIT_7_B = $178,
     433    in_BIT_7_C = $179,
     434    in_BIT_7_D = $17A,
     435    in_BIT_7_E = $17B,
     436    in_BIT_7_H = $17C,
     437    in_BIT_7_L = $17D,
     438    in_BIT_7_HL_Indirect = $17E,
     439    in_BIT_7_A = $17F,
     440    in_RES_0_B = $180,
     441    in_RES_0_C = $181,
     442    in_RES_0_D = $182,
     443    in_RES_0_E = $183,
     444    in_RES_0_H = $184,
     445    in_RES_0_L = $185,
     446    in_RES_0_HL_Indirect = $186,
     447    in_RES_0_A = $187,
     448    in_RES_1_B = $188,
     449    in_RES_1_C = $189,
     450    in_RES_1_D = $18A,
     451    in_RES_1_E = $18B,
     452    in_RES_1_H = $18C,
     453    in_RES_1_L = $18D,
     454    in_RES_1_HL_Indirect = $18E,
     455    in_RES_1_A = $18F,
     456    in_RES_2_B = $190,
     457    in_RES_2_C = $191,
     458    in_RES_2_D = $192,
     459    in_RES_2_E = $193,
     460    in_RES_2_H = $194,
     461    in_RES_2_L = $195,
     462    in_RES_2_HL_Indirect = $196,
     463    in_RES_2_A = $197,
     464    in_RES_3_B = $198,
     465    in_RES_3_C = $199,
     466    in_RES_3_D = $19A,
     467    in_RES_3_E = $19B,
     468    in_RES_3_H = $19C,
     469    in_RES_3_L = $19D,
     470    in_RES_3_HL_Indirect = $19E,
     471    in_RES_3_A = $19F,
     472    in_RES_4_B = $1A0,
     473    in_RES_4_C = $1A1,
     474    in_RES_4_D = $1A2,
     475    in_RES_4_E = $1A3,
     476    in_RES_4_H = $1A4,
     477    in_RES_4_L = $1A5,
     478    in_RES_4_HL_Indirect = $1A6,
     479    in_RES_4_A = $1A7,
     480    in_RES_5_B = $1A8,
     481    in_RES_5_C = $1A9,
     482    in_RES_5_D = $1AA,
     483    in_RES_5_E = $1AB,
     484    in_RES_5_H = $1AC,
     485    in_RES_5_L = $1AD,
     486    in_RES_5_HL_Indirect = $1AE,
     487    in_RES_5_A = $1AF,
     488    in_RES_6_B = $1B0,
     489    in_RES_6_C = $1B1,
     490    in_RES_6_D = $1B2,
     491    in_RES_6_E = $1B3,
     492    in_RES_6_H = $1B4,
     493    in_RES_6_L = $1B5,
     494    in_RES_6_HL_Indirect = $1B6,
     495    in_RES_6_A = $1B7,
     496    in_RES_7_B = $1B8,
     497    in_RES_7_C = $1B9,
     498    in_RES_7_D = $1BA,
     499    in_RES_7_E = $1BB,
     500    in_RES_7_H = $1BC,
     501    in_RES_7_L = $1BD,
     502    in_RES_7_HL_Indirect = $1BE,
     503    in_RES_7_A = $1BF,
     504    in_SET_0_B = $1C0,
     505    in_SET_0_C = $1C1,
     506    in_SET_0_D = $1C2,
     507    in_SET_0_E = $1C3,
     508    in_SET_0_H = $1C4,
     509    in_SET_0_L = $1C5,
     510    in_SET_0_HL_Indirect = $1C6,
     511    in_SET_0_A = $1C7,
     512    in_SET_1_B = $1C8,
     513    in_SET_1_C = $1C9,
     514    in_SET_1_D = $1CA,
     515    in_SET_1_E = $1CB,
     516    in_SET_1_H = $1CC,
     517    in_SET_1_L = $1CD,
     518    in_SET_1_HL_Indirect = $1CE,
     519    in_SET_1_A = $1CF,
     520    in_SET_2_B = $1D0,
     521    in_SET_2_C = $1D1,
     522    in_SET_2_D = $1D2,
     523    in_SET_2_E = $1D3,
     524    in_SET_2_H = $1D4,
     525    in_SET_2_L = $1D5,
     526    in_SET_2_HL_Indirect = $1D6,
     527    in_SET_2_A = $1D7,
     528    in_SET_3_B = $1D8,
     529    in_SET_3_C = $1D9,
     530    in_SET_3_D = $1DA,
     531    in_SET_3_E = $1DB,
     532    in_SET_3_H = $1DC,
     533    in_SET_3_L = $1DD,
     534    in_SET_3_HL_Indirect = $1DE,
     535    in_SET_3_A = $1DF,
     536    in_SET_4_B = $1E0,
     537    in_SET_4_C = $1E1,
     538    in_SET_4_D = $1E2,
     539    in_SET_4_E = $1E3,
     540    in_SET_4_H = $1E4,
     541    in_SET_4_L = $1E5,
     542    in_SET_4_HL_Indirect = $1E6,
     543    in_SET_4_A = $1E7,
     544    in_SET_5_B = $1E8,
     545    in_SET_5_C = $1E9,
     546    in_SET_5_D = $1EA,
     547    in_SET_5_E = $1EB,
     548    in_SET_5_H = $1EC,
     549    in_SET_5_L = $1ED,
     550    in_SET_5_HL_Indirect = $1EE,
     551    in_SET_5_A = $1EF,
     552    in_SET_6_B = $1F0,
     553    in_SET_6_C = $1F1,
     554    in_SET_6_D = $1F2,
     555    in_SET_6_E = $1F3,
     556    in_SET_6_H = $1F4,
     557    in_SET_6_L = $1F5,
     558    in_SET_6_HL_Indirect = $1F6,
     559    in_SET_6_A = $1F7,
     560    in_SET_7_B = $1F8,
     561    in_SET_7_C = $1F9,
     562    in_SET_7_D = $1FA,
     563    in_SET_7_E = $1FB,
     564    in_SET_7_H = $1FC,
     565    in_SET_7_L = $1FD,
     566    in_SET_7_HL_Indirect = $1FE,
     567    in_SET_7_A = $1FF,
     568    in_ADD_IX_BC = $209,
     569    in_ADD_IX_DE = $219,
     570    in_LD_IX_NN = $221,
     571    in_LD_NN_Indirect_IX = $222,
     572    in_INC_IX = $223,
     573    in_ADD_IX_IX = $229,
     574    in_LD_IX_NN_Indirect = $22A,
     575    in_DEC_IX = $22B,
     576    in_INC_IX_Plus_D_Indirect = $234,
     577    in_DEC_IX_Plus_D_Indirect = $235,
     578    in_LD_IX_Plus_D_Indirect_N = $236,
     579    in_ADD_IX_SP = $239,
     580    in_LD_B_IX_Plus_D_Indirect = $246,
     581    in_LD_C_IX_Plus_D_Indirect = $24E,
     582    in_LD_D_IX_Plus_D_Indirect = $256,
     583    in_LD_E_IX_Plus_D_Indirect = $25E,
     584    in_LD_H_IX_Plus_D_Indirect = $266,
     585    in_LD_L_IX_Plus_D_Indirect = $26E,
     586    in_LD_IX_Plus_D_Indirect_B = $270,
     587    in_LD_IX_Plus_D_Indirect_C = $271,
     588    in_LD_IX_Plus_D_Indirect_D = $272,
     589    in_LD_IX_Plus_D_Indirect_E = $273,
     590    in_LD_IX_Plus_D_Indirect_H = $274,
     591    in_LD_IX_Plus_D_Indirect_L = $275,
     592    in_LD_IX_Plus_D_Indirect_A = $277,
     593    in_LD_A_IX_Plus_D_Indirect = $27E,
     594    in_ADD_A_IX_Plus_D_Indirect = $286,
     595    in_ADC_A_IX_Plus_D_Indirect = $28E,
     596    in_SUB_IX_Plus_D_Indirect = $296,
     597    in_SBC_A_IX_Plus_D_Indirect = $29E,
     598    in_AND_IX_Plus_D_Indirect = $2A6,
     599    in_XOR_IX_Plus_D_Indirect = $2AE,
     600    in_OR_IX_Plus_D_Indirect = $2B6,
     601    in_CP_IX_Plus_D_Indirect = $2BE,
     602    in_POP_IX = $2E1,
     603    in_EX_SP_Indirect_IX = $2E3,
     604    in_PUSH_IX = $2E5,
     605    in_JP_IX_Indirect = $2E9,
     606    in_LD_SP_IX = $2F9,
     607    in_RLC_IX_Plus_D_Indirect = $2CB,
     608    in_RRC_IX_Plus_D_Indirect = $2CB,
     609    in_RL_IX_Plus_D_Indirect = $2CB,
     610    in_RR_IX_Plus_D_Indirect = $2CB,
     611    in_SLA_IX_Plus_D_Indirect = $2CB,
     612    in_SRA_IX_Plus_D_Indirect = $2CB,
     613    in_SRL_IX_Plus_D_Indirect = $2CB,
     614    in_BIT_0_IX_Plus_D_Indirect = $2CB,
     615    in_BIT_1_IX_Plus_D_Indirect = $2CB,
     616    in_BIT_2_IX_Plus_D_Indirect = $2CB,
     617    in_BIT_3_IX_Plus_D_Indirect = $2CB,
     618    in_BIT_4_IX_Plus_D_Indirect = $2CB,
     619    in_BIT_5_IX_Plus_D_Indirect = $2CB,
     620    in_BIT_6_IX_Plus_D_Indirect = $2CB,
     621    in_BIT_7_IX_Plus_D_Indirect = $2CB,
     622    in_RES_0_IX_Plus_D_Indirect = $2CB,
     623    in_RES_1_IX_Plus_D_Indirect = $2CB,
     624    in_RES_2_IX_Plus_D_Indirect = $2CB,
     625    in_RES_3_IX_Plus_D_Indirect = $2CB,
     626    in_RES_4_IX_Plus_D_Indirect = $2CB,
     627    in_RES_5_IX_Plus_D_Indirect = $2CB,
     628    in_RES_6_IX_Plus_D_Indirect = $2CB,
     629    in_RES_7_IX_Plus_D_Indirect = $2CB,
     630    in_SET_0_IX_Plus_D_Indirect = $2CB,
     631    in_SET_1_IX_Plus_D_Indirect = $2CB,
     632    in_SET_2_IX_Plus_D_Indirect = $2CB,
     633    in_SET_3_IX_Plus_D_Indirect = $2CB,
     634    in_SET_4_IX_Plus_D_Indirect = $2CB,
     635    in_SET_5_IX_Plus_D_Indirect = $2CB,
     636    in_SET_6_IX_Plus_D_Indirect = $2CB,
     637    in_SET_7_IX_Plus_D_Indirect = $2CB,
     638    in_ADD_IY_BC = $409,
     639    in_ADD_IY_DE = $419,
     640    in_LD_IY_NN = $421,
     641    in_LD_NN_Indirect_IY = $422,
     642    in_INC_IY = $423,
     643    in_ADD_IY_IY = $429,
     644    in_LD_IY_NN_Indirect = $42A,
     645    in_DEC_IY = $42B,
     646    in_INC_IY_Plus_D_Indirect = $434,
     647    in_DEC_IY_Plus_D_Indirect = $435,
     648    in_LD_IY_Plus_D_Indirect_N = $436,
     649    in_ADD_IY_SP = $439,
     650    in_LD_B_IY_Plus_D_Indirect = $446,
     651    in_LD_C_IY_Plus_D_Indirect = $44E,
     652    in_LD_D_IY_Plus_D_Indirect = $456,
     653    in_LD_E_IY_Plus_D_Indirect = $45E,
     654    in_LD_H_IY_Plus_D_Indirect = $466,
     655    in_LD_L_IY_Plus_D_Indirect = $46E,
     656    in_LD_IY_Plus_D_Indirect_B = $470,
     657    in_LD_IY_Plus_D_Indirect_C = $471,
     658    in_LD_IY_Plus_D_Indirect_D = $472,
     659    in_LD_IY_Plus_D_Indirect_E = $473,
     660    in_LD_IY_Plus_D_Indirect_H = $474,
     661    in_LD_IY_Plus_D_Indirect_L = $475,
     662    in_LD_IY_Plus_D_Indirect_A = $477,
     663    in_LD_A_IY_Plus_D_Indirect = $47E,
     664    in_ADD_A_IY_Plus_D_Indirect = $486,
     665    in_ADC_A_IY_Plus_D_Indirect = $48E,
     666    in_SUB_IY_Plus_D_Indirect = $496,
     667    in_SBC_A_IY_Plus_D_Indirect = $49E,
     668    in_AND_IY_Plus_D_Indirect = $4A6,
     669    in_XOR_IY_Plus_D_Indirect = $4AE,
     670    in_OR_IY_Plus_D_Indirect = $4B6,
     671    in_CP_IY_Plus_D_Indirect = $4BE,
     672    in_POP_IY = $4E1,
     673    in_EX_SP_Indirect_IY = $4E3,
     674    in_PUSH_IY = $4E5,
     675    in_JP_IY_Indirect = $4E9,
     676    in_LD_SP_IY = $4F9,
     677    in_RLC_IY_Plus_D_Indirect = $4CB,
     678    in_RRC_IY_Plus_D_Indirect = $4CB,
     679    in_RL_IY_Plus_D_Indirect = $4CB,
     680    in_RR_IY_Plus_D_Indirect = $4CB,
     681    in_SLA_IY_Plus_D_Indirect = $4CB,
     682    in_SRA_IY_Plus_D_Indirect = $4CB,
     683    in_SRL_IY_Plus_D_Indirect = $4CB,
     684    in_BIT_0_IY_Plus_D_Indirect = $4CB,
     685    in_BIT_1_IY_Plus_D_Indirect = $4CB,
     686    in_BIT_2_IY_Plus_D_Indirect = $4CB,
     687    in_BIT_3_IY_Plus_D_Indirect = $4CB,
     688    in_BIT_4_IY_Plus_D_Indirect = $4CB,
     689    in_BIT_5_IY_Plus_D_Indirect = $4CB,
     690    in_BIT_6_IY_Plus_D_Indirect = $4CB,
     691    in_BIT_7_IY_Plus_D_Indirect = $4CB,
     692    in_RES_0_IY_Plus_D_Indirect = $4CB,
     693    in_RES_1_IY_Plus_D_Indirect = $4CB,
     694    in_RES_2_IY_Plus_D_Indirect = $4CB,
     695    in_RES_3_IY_Plus_D_Indirect = $4CB,
     696    in_RES_4_IY_Plus_D_Indirect = $4CB,
     697    in_RES_5_IY_Plus_D_Indirect = $4CB,
     698    in_RES_6_IY_Plus_D_Indirect = $4CB,
     699    in_RES_7_IY_Plus_D_Indirect = $4CB,
     700    in_SET_0_IY_Plus_D_Indirect = $4CB,
     701    in_SET_1_IY_Plus_D_Indirect = $4CB,
     702    in_SET_2_IY_Plus_D_Indirect = $4CB,
     703    in_SET_3_IY_Plus_D_Indirect = $4CB,
     704    in_SET_4_IY_Plus_D_Indirect = $4CB,
     705    in_SET_5_IY_Plus_D_Indirect = $4CB,
     706    in_SET_6_IY_Plus_D_Indirect = $4CB,
     707    in_SET_7_IY_Plus_D_Indirect = $4CB
    83708  );
    84709
Note: See TracChangeset for help on using the changeset viewer.