The original info from the official documentation is that I got, for example, this 00 00 08 99 7D FB 1A 03 8D 7E A4 C6 80 00 response.
I need to convert this data from hex to bytes and use half for the control sum and another half for the total sum.
As I can see in their example, they created 2 separate arrays of bytes, set the first byte to 00, and then added the rest of the 7 from the response.
I try to convert this method in Delphi's way like this:
SetLength(answer, 14);
answer[00] := $00;
answer[01] := $00;
answer[02] := $08;
answer[03] := $99;
answer[04] := $06;
answer[05] := $F6;
answer[06] := $5A;
answer[07] := $03;
answer[08] := $8D;
answer[09] := $7E;
answer[10] := $A4;
answer[11] := $C6;
answer[12] := $80;
answer[13] := $00;
SetLength(bb, 16);
bb[0] := 0;
Move(answer[0], bb[1], 7);
bb[8] := 0;
Move(answer[7], bb[9], 7);
Move(bb[0], controlSum, SizeOf(Int64));
Move(bb[8], totalSum, SizeOf(Int64));
in this example controlSum is 3.693.490,87 and totalSum is 100.000.000.000,00. this is values behind this response in hex format.
Thanks one again for all...