home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c500 / 4.ddi / BUILD.WEX / ISWIN.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-28  |  325 b   |  18 lines

  1. /*
  2.  * tests if you are running in a windows dos box
  3.  */
  4. extern char IsWindows( void );
  5. #pragma aux IsWindows = \
  6.         0xb8 0x00 0x16    /* mov ax,1600h */ \
  7.     0xcd 0x2f    /* int 2f */ \
  8.     value [al];
  9.  
  10. main( void )
  11. {
  12.     char    rc;
  13.  
  14.     rc = IsWindows();
  15.     if( rc == 0 || rc == 0x80 ) exit( 0 );
  16.     exit( 1 );
  17. }
  18.