WITH   Gnat.IO ;  USE Gnat.IO;

PROCEDURE   CharTb34  IS

   C_HexCh : String(1..16) := "0123456789ABCDEF" ;

   L_Code : Integer ;

BEGIN
   Put_Line (   "          0 1 2 3 4 5 6 7 8 9 A B C D E F"   );
   Put_Line (   "          -------------------------------"   );

   ----- LOOP 1
   FOR L_i in 0..15 LOOP
      ----- Line address (in decimal) and in hexa
      Put (   "("   );
      IF (L_i*16) <= 99 THEN Put (   " "   ); END IF;
      IF (L_i*16) <= 9 THEN Put (   " "   ); END IF;
      Put (   L_i*16   );
      Put (   ") "   );

      Put (   C_HexCh(L_i+1)   );
      Put (   "0>"   );

      ----- LOOP 2
      FOR L_j in 0..15 LOOP
         L_Code := L_i*16  +  L_j ;

         Put (   " "   );

         ----- Write char  ( Ignoring problem chars )
         CASE L_Code IS
            WHEN 0  =>   Put (   "-"   );      --- EOF   End Of File
            WHEN 7  =>   Put (   "-"   );      --- BEL   Bell
            WHEN 8  =>   Put (   "-"   );      --- BS    Backspace
            WHEN 9  =>   Put (   "-"   );      --- HT    Tabulation
            WHEN 10 =>   Put (   "-"   );      --- LF    Line Feed
            WHEN 13 =>   Put (   "-"   );      --- CR    Carriage Return
            WHEN 26 =>   Put (   "-"   );      --- ??
            WHEN OTHERS =>
               Put (   Character'Val(L_Code)   );
         END CASE;
      END LOOP;--j

      New_Line ;
   END LOOP;--i
END;
