ungetestet, einfach nur hier so reingetippert:
Delphi-Quellcode:
var s: String;
y, l: Integer;
begin
Memo1.BeginUpdate;
l := 0; s := StringOfChar(32, 6);
for y:=Low(a) to High(a) do begin
s := s + Format('$%0.2x', [a[y]]);
Inc(l);
if (l >= 20) or (y = High(a)) then begin
Memo1.Lines.Add(s);
l := 0; s := StringOfChar(32, 6);
end if;
end;
Memo1.EndUpdate;
end;