home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / directry / mv / break.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-05  |  1017 b   |  35 lines

  1. /*
  2. Return-Path: <pwu@unix.macc.wisc.edu>
  3. Received: FROM UNIX.MACC.WISC.EDU BY B.ISI.EDU WITH TCP ; 8 Sep 86 16:19:01 PDT
  4. Received: by unix.macc.wisc.edu;
  5.           id AA04924; 4.12/5; Mon, 8 Sep 86 17:30:36 cdt
  6. Date: Mon, 8 Sep 86 17:30:36 cdt
  7. From: Peter Wu <pwu@unix.macc.wisc.edu>
  8. Message-Id: <8609082230.AA04924@unix.macc.wisc.edu>
  9. To: info-ibmpc-request@mosis
  10. Subject: break.c
  11. */
  12. /* routines to read break status and set break status (to on or off) */
  13.  
  14. #include <dos.h>
  15.  
  16. bstat()  /* get break status 0=off, 1=on */
  17. {
  18.   union REGS inregs, outregs;
  19.  
  20.   inregs.h.al = 0;  /* request break status */
  21.   inregs.h.ah = 0x33;  /* DOS function for ctrl-break check */
  22.   intdos(&inregs, &outregs);
  23.   return outregs.h.dl;
  24. }
  25.  
  26. bset(onoff)  /* set break status 0=off 1=on */
  27. {
  28.   union REGS inregs, outregs;
  29.  
  30.   inregs.h.al = 1;  /* set break status */
  31.   inregs.h.ah = 0x33;  /* DOS function for ctrl-break check */
  32.   inregs.h.dl = onoff;  /* set to on or off */
  33.   intdos(&inregs, &outregs);
  34. }
  35.