Program F11F12_Test;

uses F11F12, CRT;

var c: char;


function  hex(n: byte): string;      { Converte un num. decimale in esadec. }
  const HexDgt: array[0..15] of char ='0123456789ABCDEF';
  begin
     hex:=HexDgt[n div 16] + HexDgt[n mod 16]
  end;


begin
   clrscr;
   if not EnhKbdAvailable then
      begin
         writeln('Tasti F11 ed F12 non disponibili!');
         exit
      end;

   writeln('Prova le combinazioni di tasti, poi premi SPAZIO per uscire.');
   writeln;
   repeat
      c := ReadKey;
      write(hex(ord(c)));
      if c = #0 then
         begin
            c := ReadKey;
            write(hex(ord(c)))
         end;
      write('  ')
   until c = #32;
   writeln
end.
