{----------------------------------------------------------------------------
  Keyboard support
  Copyright (c) 1994,95 by J.E. Hoffmann
  All rights reserved
 ----------------------------------------------------------------------------}
{$A+,B-,D-,E-,F-,G+,I-,L-,N-,O-,P-,Q-,R-,S-,T-,V-,X+,Y-}
unit _Keyb;



interface



function KeyPressed :Boolean;
function ReadKey :Char;



implementation



function ReadKey :Char; assembler;
asm
       mov    ah,00h
       int    16h
       or     al,al
       jnz    @@11
       mov    al,ah

   @@11:
       push   0040h
       pop    es
       mov    bx,[es:001Ah]
       mov    [es:001Ch],bx
end;


function KeyPressed :Boolean; assembler;
asm
       mov    ah,01h
       int    16h
       jz     @@11
       mov    al,1
       jmp    @@21
  @@11:
       xor    al,al
  @@21:
end;



end.