program ter (input,output);

uses
  crt,printer;
Type
  stringtype = string[3];
Var
  ans:integer;

{###########################################################################}
Procedure ListAll;
Var
  I:integer;
Begin
  clrscr;
  For I := 1 to 255 do
    If (I = 89) or (I = 181) or (I = 255) then
      Begin
        write (I:8,' is ASCII: ',char(I));
        writeln;
        write ('Strike any key to continue....');
        readkey;
        clrscr;
      end
    Else
      Begin
        write (I:8,' is ASCII: ',char(I));
      end;
end;
{###########################################################################}
Procedure PrintAll;
Var
  X:integer;
Begin
  clrscr;
  For X := 1 to 255 do
    Begin
      write (lst,X:8,' is ASCII: ',char(X));
    end;
end;
{###########################################################################}
Procedure Menu (VAR choice:integer);
Var
  ch:char;
  code:integer;
Begin
  writeln ('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
  Writeln ('³   ASCII LIST OPTIONS    ³');
  writeln ('ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´');
  WRITELN ('³ 1. Print list to screen.³');
  writeln ('³ 2. Print to printer.....³');
  {writeln ('³ 3. Check single number..³');}
  writeln ('³ 3. Quit.................³');
  writeln ('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ');
  writeln;
  write ('ENTER YOUR SELECTION (do not push enter!): ');
  {readln(choice);}
  code :=1;
  While code <> 0 do
  begin
    ch := readkey;
    val(ch,choice,code);
    If code <> 0 then
    write(^g) else write(ch);
  end;
end;
{###########################################################################}
Procedure SingleChk;
Var
  S,b4,aftr,input:stringtype;
Begin
  clrscr;
  write ('Enter the number you wish to convert: ');
  readln(input);
  b4 := (input);
    Begin
      aftr := (concat(input[1]));
    end;
  writeln (b4,' is equal to the ASCII character: ',input,'.....');
  writeln ('Strike  to continue....');
end;
{###########################################################################}
Begin {main}
  clrscr;
  textcolor(43);
  writeln ('Welcome to Gary''s ASCII conversion chart!':60);
  textcolor(11);
  writeln;
  writeln ('This chart tells you the number and it''s ASCII counterpart.');
  writeln ('To get the ASCII character, hold down the  key and type the');
  writeln ('number it equals on the number-pad(right side of keyboard). The');
  writeln ('character will appear AFTER you release the  key. Also, some');
  writeln ('will not appear when entered because that character is used by a');
  writeln ('program function (EX: the ^ character is the  key).');
  writeln ('Strike  to continue....');
  readln;
  clrscr;
  Repeat
    Menu (ans);
    If (ans = 1) then
      Listall
    else if (ans = 2) then
      Printall;
    {Else If (ans = 3) then
      SinglChk;}
  until (ans = 3);
end.

    Source: geocities.com/~franzglaser/tpsrc

               ( geocities.com/~franzglaser)