home *** CD-ROM | disk | FTP | other *** search
- /*
- Return-Path: <pwu@unix.macc.wisc.edu>
- Received: FROM UNIX.MACC.WISC.EDU BY B.ISI.EDU WITH TCP ; 8 Sep 86 16:19:01 PDT
- Received: by unix.macc.wisc.edu;
- id AA04924; 4.12/5; Mon, 8 Sep 86 17:30:36 cdt
- Date: Mon, 8 Sep 86 17:30:36 cdt
- From: Peter Wu <pwu@unix.macc.wisc.edu>
- Message-Id: <8609082230.AA04924@unix.macc.wisc.edu>
- To: info-ibmpc-request@mosis
- Subject: break.c
- */
- /* routines to read break status and set break status (to on or off) */
-
- #include <dos.h>
-
- bstat() /* get break status 0=off, 1=on */
- {
- union REGS inregs, outregs;
-
- inregs.h.al = 0; /* request break status */
- inregs.h.ah = 0x33; /* DOS function for ctrl-break check */
- intdos(&inregs, &outregs);
- return outregs.h.dl;
- }
-
- bset(onoff) /* set break status 0=off 1=on */
- {
- union REGS inregs, outregs;
-
- inregs.h.al = 1; /* set break status */
- inregs.h.ah = 0x33; /* DOS function for ctrl-break check */
- inregs.h.dl = onoff; /* set to on or off */
- intdos(&inregs, &outregs);
- }