{@@@@@@@@@@@ copyright (C) 1984 by Neil J. Rubenking @@@@@@@@@@@@@@@@@@@@@@@@
The purchaser of these procedures and functions may include them in COMPILED
programs freely, but may not sell or give away the source text.

     The file GRFXTABL.LIB contains the definition of a variable
     called "table" that is exactly the "shape" of the ROM graphics
     table, and in the same place.  Because it's ROM, we can't
     change it, but we can look at how the characters are mapped
     out.  These are exactly the dot patterns used in text mode.

}

{$I windows.lib}
{$I grfxtabl.lib}
{$I getkeys.lib}
const
  CharWin : corners = (60,5,67,13);
  TextWin : corners = (2,2,50,23);
  MainWin : corners = (1,1,80,25);

var
  C, D : char;

{@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@}
begin
  DoFrame(TextWin,'Í','º');
  DoWindow(TextWin);
  WriteLn('Press any key that generates a character with');
  WriteLn('an ASCII code < 127.  This program looks up the');
  WriteLn('"picture" of that character in the Video ROM');
  WriteLn('and shows it onscreen. The characters produced');
  WriteLn('by holding down the <Alt> key and typing in a');
  WriteLn('number from 1 to 31 on the keypad are enter-');
  WriteLn('taining.');
  WriteLn;
  WriteLn('Keys that generate "Escape codes" (function');
  WriteLn('keys, arrow keys) will display the character');
  WriteLn('AFTER the Esc.');
  WriteLn;
  WriteLn('Press <SpaceBar> to begin, <Esc> to end.');
  repeat until keypressed;
  DoFrame(CharWin,'Ä','³');
  DoWindow(CharWin);
  repeat
    GetKeys(C,D);
    if C = #27 then
      ShowEntry(table[ord(D)])
    else
      ShowEntry(table[ord(C)]);
  until (C = #27) and (D = #0);
  DoWindow(MainWin);
  ClrScr;
end.




