home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name scblink -- Choose role of attribute bit 7 on EGA:
- * foreground blink or background intensity
- *
- * Synopsis ercode = scblink(option);
- *
- * int ercode 0 if successful,
- * 1 if operation not valid for current
- * video adapter.
- * int option SC_BLINK to cause attribute bit 7
- * to control foreground blinking;
- * SC_INTENSITY to cause attribute bit 7
- * to control background intensity.
- *
- * Description This function controls the role of attribute bit 7 as
- * used in text modes on the Enhanced Graphics Adapter.
- *
- * If SC_BLINK is specified, attribute bit 7 controls the
- * blinking of the character. This is the default
- * condition established when the video adapter is reset.
- * Eight colors are available for background, as specified
- * by attribute bits 4-6.
- *
- * If SC_INTENSITY is specified, attribute bit 7 is used
- * along with attribute bits 4-6 to specify the background
- * color. This allows a choice of the same sixteen
- * background colors as are available for the foreground.
- * Blinking is not available.
- *
- * Returns ercode 0 if successful,
- * 1 if operation not valid for current
- * video adapter.
- *
- * Version 6.00 (C)Copyright Blaise Computing Inc. 1987,1989
- *
- **/
-
- #include <dos.h>
-
- #include <bscreens.h>
-
- #define BLINK_BIT 0x20
-
- #define OK 0 /* Error codes. */
- #define INVALID_REQUEST 1
-
- int scblink(option)
- int option;
- {
- int result;
- int mode,act_page,columns;
- union REGS inregs,outregs;
-
- scequip();
- scmode(&mode,&columns,&act_page);
-
- if ( b_device == b_ega
- || b_device == b_vga
- || b_device == b_mcga
- || b_pcmodel == IBM_JR)
- {
- inregs.x.ax = 0x1003; /* Set intensify/blinking bit. */
- inregs.h.bl = (unsigned char) option;
- int86(0x10,&inregs,&outregs);
- result = OK;
- }
- else
- result = INVALID_REQUEST;
-
- return result;
- }