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

  1. /*
  2. **  Set or determine the status of the DOS "SET BREAK=" command
  3. */
  4.  
  5. #include <dos.h>
  6.  
  7. #define BOOL(x) (!(!(x)))
  8.  
  9. /*
  10. **  Returns status of DOS "SET BREAK" command
  11. */
  12.  
  13. int isBreakOn(void)
  14. {
  15.       union REGS regs;
  16.  
  17.       regs.x.ax = 0x3300;
  18.       intdos(®s, ®s);
  19.       return (int)regs.h.dl;
  20. }
  21.  
  22. void setBreak(int OnOff)      /* Off = 0, On = 1      */
  23. {
  24.       union REGS regs;
  25.  
  26.       regs.x.ax = 0x3301;
  27.       regs.h.dl = OnOff;
  28.       intdos(®s, ®s);
  29. }
  30.