home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_C / SNIP9404.ZIP / DROPTIME.C < prev    next >
C/C++ Source or Header  |  1994-04-03  |  556b  |  22 lines

  1. /** int drop_time(void)
  2. **
  3. **   Drops current timeslice in OS/2, Win, DPMI 1.0 and (I think) DV
  4. **
  5. **  Returns:  0 if not successful, 1 if dropped
  6. **
  7. **  Based on Ralf Brown's Interrupt list.
  8. **  Donated to Public Domain by Thor Johnson.
  9. **
  10. ***********************************************************************/
  11.  
  12. #include <dos.h>
  13.  
  14. int drop_time(void)     /* Drops Time-slice, giving to another program */
  15. {
  16.       union REGS regs;
  17.  
  18.       regs.x.ax = 0x1680;
  19.       int86(0x2f, ®s, ®s);
  20.       return (regs.h.al == 0x80)? 0 : 1;
  21. }
  22.