home *** CD-ROM | disk | FTP | other *** search
- /*-----------------------------------------------------------------------*
- * filename - kbhit.cas
- *
- * function(s)
- * kbhit - checks for recent keystrokes
- *-----------------------------------------------------------------------*/
-
- /*[]------------------------------------------------------------[]*/
- /*| |*/
- /*| Turbo C Run Time Library - Version 3.0 |*/
- /*| |*/
- /*| |*/
- /*| Copyright (c) 1987,1988,1990 by Borland International |*/
- /*| All Rights Reserved. |*/
- /*| |*/
- /*[]------------------------------------------------------------[]*/
-
- #pragma inline
- #include <conio.h>
-
- /*-----------------------------------------------------------------------*
-
- Name kbhit - checks for recent keystrokes
-
- Usage int kbhit(void);
-
- Prototype in conio.h
-
- Description kbhit checks to see if a keystroke is currently
- available. Any available keystrokes can be retrieved with
- getch or getche.
-
- Return value If a keystroke is available, kbhit returns a
- non-zero integer. If not, it returns 0.
-
- *------------------------------------------------------------------------*/
- int kbhit( void )
- {
- asm mov ah, 0Bh
- asm int 21h
- asm cbw
-
- return( _AX );
- }
-