unit Unit1;

interface

uses
  SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  Forms, Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Memo1: TMemo;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

VAR
   G_Buffer : ARRAY[0..4096] of Char ;

procedure TForm1.Button1Click(Sender: TObject);
CONST
   C_CRLFz : ARRAY[0..2] of Char = #13#10  +  #0 ;
VAR
   L_P      : PChar ;
   L_Buf25  : ARRAY[0..25] of Char ;
   L_Buf01z : ARRAY[0..1] of Char ;

   i : Integer ;
begin
   L_P := @G_Buffer ;
   L_P^:= #0 ;

   L_Buf01z[1] := #0 ;

   {----- LOOP , On each char }
   FOR i := 0 TO 255 DO BEGIN
      Str ( i , L_Buf25 );
      L_P := StrECopy ( L_P ,  L_Buf25  );
      L_P := StrECopy ( L_P ,  '   '    );

      {----- Write char  ( Ignoring problem chars )  }
      CASE i OF
         $00 , $09 : L_Buf01z[0] := '-' ;
         ELSE L_Buf01z[0] := Chr(i);
      END;{case}
      L_P := StrECopy ( L_P ,  L_Buf01z  );

      L_P := StrECopy ( L_P ,  C_CRLFz  );
   END;{i}

   Memo1.SetTextBuf ( G_Buffer );
end;

end.
