Please, look at the link I posted above...
Where you can, for example, find this code:
[pascal] for i := 0 to 255 do
begin
if (diks[i] and $80) <> 0 then
begin
strNewText := strNewText + Format('$%02x ', [i]);
end;
end;
[/pascal]