anchor.diff:    end;
   end;
   
  -procedure TX86Flags.SetAC(const Value: TX86FlagValue);
  -begin
  -  if (FAC <> Value) then
  -  begin
  -    FAC := Value;
  -    Changed;
  -  end;
  -end;
  -
  -procedure TX86Flags.SetAF(const Value: TX86FlagValue);
  -begin
  -  if (FAF <> Value) then
  -  begin
  -    FAF := Value;
  -    Changed;
  -  end;
  -end;
  -
  -procedure TX86Flags.SetCF(const Value: TX86FlagValue);
  -begin
  -  if (FCF <> Value) then
  -  begin
  -    FCF := Value;
  -    Changed;
  -  end;
  -end;
  -
  -procedure TX86Flags.SetDF(const Value: TX86FlagValue);
  -begin
  -  if (FDF <> Value) then
  -  begin
  -    FDF := Value;
  -    Changed;
  -  end;
  -end;
  -
  -procedure TX86Flags.SetID(const Value: TX86FlagValue);
  -begin
  -  if (FID <> Value) then
  -  begin
  -    FID := Value;
  -    Changed;
  -  end;
  -end;
  -
  -procedure TX86Flags.SetIF(const Value: TX86FlagValue);
  -begin
  -  if (FIF <> Value) then
  -  begin
  -    FIF := Value;
  -    Changed;
  -  end;
  -end;
  -
  -procedure TX86Flags.SetOF(const Value: TX86FlagValue);
  -begin
  -  if (FOF <> Value) then
  -  begin
  -    FOF := Value;
  -    Changed;
  -  end;
  -end;
  -
  -procedure TX86Flags.SetPF(const Value: TX86FlagValue);
  -begin
  -  if (FPF <> Value) then
  -  begin
  -    FPF := Value;
  -    Changed;
  -  end;
  -end;
  -
  -procedure TX86Flags.SetRF(const Value: TX86FlagValue);
  -begin
  -  if (FRF <> Value) then
  -  begin
  -    FRF := Value;
  -    Changed;
  -  end;
  -end;
  -
  -procedure TX86Flags.SetSF(const Value: TX86FlagValue);
  -begin
  -  if (FSF <> Value) then
  -  begin
  -    FSF := Value;
  -    Changed;
  -  end;
  -end;
  -
  -procedure TX86Flags.SetTF(const Value: TX86FlagValue);
  -begin
  -  if (FTF <> Value) then
  -  begin
  -    FTF := Value;
  -    Changed;
  -  end;
  -end;
  -
  -procedure TX86Flags.SetVIF(const Value: TX86FlagValue);
  -begin
  -  if (FVIF <> Value) then
  -  begin
  -    FVIF := Value;
  -    Changed;
  -  end;
  -end;
  -
  -procedure TX86Flags.SetVIP(const Value: TX86FlagValue);
  -begin
  -  if (FVIP <> Value) then
  -  begin
  -    FVIP := Value;
  -    Changed;
  -  end;
  -end;
  -
  -procedure TX86Flags.SetVM(const Value: TX86FlagValue);
  -begin
  -  if (FVM <> Value) then
  -  begin
  -    FVM := Value;
  -    Changed;
  -  end;
  -end;
  -
  -procedure TX86Flags.SetZF(const Value: TX86FlagValue);
  -begin
  -  if (FZF <> Value) then
  -  begin
  -    FZF := Value;
  +procedure TX86Flags.SetFlagValue(Index: Integer; const Value: TX86FlagValue);
  +var
  +  Flag: PX86FlagValue;
  +begin
  +  Flag := GetFlagById(Index);
  +  if (Flag^ <> Value) then
  +  begin
  +    Flag^ := Value;
       Changed;
     end;
   end;
  
positive.code:     FIF: TX86FlagValue;
      FDF: TX86FlagValue;
      FOF: TX86FlagValue;
      FRF: TX86FlagValue;
      FVM: TX86FlagValue;
      FAC: TX86FlagValue;
  
negative.code:   end;
  end;
  
  function TX86Flags.GetFlagCount: Integer;
  begin
    Result := 17;
  end;
  
  function TX86Flags.GetFlagValue(Index: Integer): TX86FlagValue;
  begin
    Result := GetFlagById(Index)^;
  end;
  
  function TX86Flags.GetFlagById(Id: Integer): PX86FlagValue;
  begin
    Result := nil;
    case Id of
       0: Result := @FCF;
       1: Result := @FPF;
       2: Result := @FAF;
       3: Result := @FZF;
       4: Result := @FSF;
       5: Result := @FTF;
       6: Result := @FIF;
       7: Result := @FDF;
       8: Result := @FOF;
       9: Result := @FIOPL;
      10: Result := @FNT;
      11: Result := @FRF;
      12: Result := @FVM;
      13: Result := @FAC;
      14: Result := @FVIF;
      15: Result := @FVIP;
      16: Result := @FID;
    end;
  end;
  
  procedure TX86Flags.LoadFromJSON(JSON: PJSONVariantData; const FieldName: String);
  var
    C: PJSONVariantData;
    N: array[0..16] of String;
    I: Integer;
  begin
    C := JSON.Data(FieldName);
  