Скрипт для формирования номера банка:
unit ite1167_bank;
function Main(Buff : OleVariant; aPos : Integer): OleVariant;
var
bH : Byte;
bL : Byte;
bBank : Byte;
begin
bBank:=255;
if ((aPos>=0) and (aPos<3145728)) then bBank:=0;
if ((aPos>=3145728) and (aPos<4313088)) then bBank:=1;
if ((aPos>=4313088) and (aPos<6561792)) then bBank:=2;
if ((aPos>=8626176) and (aPos<11771904)) then bBank:=3;
if ((aPos>=11771904) and (aPos<12939264)) then bBank:=4;
if ((aPos>=12939264) and (aPos<15187968)) then bBank:=5;
result := IntToHex(bBank,2);
end;
end.
Скрипт для формирования номера блока:
unit ite_1167bn;
function Main(Buff : OleVariant; aPos : Integer): OleVariant;
var
bH : Byte;
bL : Byte;
wHL : Word;
begin
bH := Buff[514] and $0F;
bL := Buff[515];
wHL := bH;
wHL := wHL shl 8;
wHL := wHL + bL;
wHL := wHL shr 1;
bL := wHL and $00FF;
bH := wHL shr 8;
result := IntToHex(bH,2) + ' ' + IntToHex(bL,2);
end;
end.