Mail Archives: djgpp-workers/1996/07/22/10:18:42
On Sun, 21 Jul 1996, DJ Delorie wrote:
> Since Borland has highvideo(), lowvideo(), and normvideo(), how about
> blinkvideo() and intensevideo()?
Here they are:
*** src/libc/pc_hw/co80/conio.c~2	Sun Jul 21 17:58:22 1996
--- src/libc/pc_hw/co80/conio.c	Mon Jul 22 16:27:02 1996
***************
*** 941,946 ****
--- 941,966 ----
  }
  
  void
+ blinkvideo(void)
+ {
+ 
+   /* Set intensity/blinking bit to BLINKING.  */
+   regs.h.bl = 1;
+   regs.x.ax = 0x1003;
+   __dpmi_int(0x10, ®s);
+ }
+ 
+ void
+ intensevideo(void)
+ {
+ 
+   /* Set intensity/blinking bit to INTENSE (bright background).  */
+   regs.h.bl = 0;
+   regs.x.ax = 0x1003;
+   __dpmi_int(0x10, ®s);
+ }
+ 
+ void
  gppconio_init(void)
  {
    /* Force initialization in restarted programs (emacs).  */
*** src/libc/pc_hw/co80/conio.t~0	Wed Sep  6 06:23:30 1995
--- src/libc/pc_hw/co80/conio.txh	Mon Jul 22 16:41:12 1996
***************
*** 596,598 ****
--- 596,648 ----
  This function has a side effect of erasing the screen contents, so
  application programs which use it should make their own arrangements to
  redisplay it.
+ @c ----------------------------------------------------------------------
+ @node blinkvideo, conio
+ 
+ @subheading Syntax
+ 
+ @example
+ #include <conio.h>
+ void blinkvideo(void);
+ @end example
+ 
+ @subheading Description
+ 
+ Bit 7 (@samp{MSB}) of the character attribute byte has two possible
+ effects on EGA and VGA displays: it can either make the character blink
+ or change the background color to bright (thus allowing for 16
+ background colors as opposed to the usual 8).  This function sets that
+ bit to display blinking characters.  After a call to this function,
+ every character written to the screen with bit 7 of the attribute byte
+ set, will blink.  The companion function @code{intensevideo}
+ (@pxref{intensevideo}) has the opposite effect.
+ 
+ Note that there is no BIOS function to get the current status of this
+ bit, but bit 5 of the byte at @code{0040h:0065h} in the BIOS area
+ indicates the current state: if it's 1 (the default), blinking
+ characters will be displayed.
+ @c ----------------------------------------------------------------------
+ @node intensevideo, conio
+ 
+ @subheading Syntax
+ 
+ @example
+ #include <conio.h>
+ void intensevideo(void);
+ @end example
+ 
+ @subheading Description
+ 
+ Bit 7 (@samp{MSB}) of the character attribute byte has two possible
+ effects on EGA and VGA displays: it can either make the character blink
+ or change the background color to bright (thus allowing for 16
+ background colors as opposed to the usual 8).  This function sets that
+ bit to display bright background colors.  After a call to this function,
+ every character written to the screen with bit 7 of the attribute byte
+ set, will have a bright background color.  The companion function
+ @code{blinkvideo} (@pxref{blinkvideo}) has the opposite effect.
+ 
+ Note that there is no BIOS function to get the current status of this
+ bit, but bit 5 of the byte at @code{0040h:0065h} in the BIOS area
+ indicates the current state: if it's 1 (the default), blinking
+ characters will be displayed.
*** include/conio.h~0	Wed Sep  6 06:33:46 1995
--- include/conio.h	Mon Jul 22 16:27:02 1996
***************
*** 59,64 ****
--- 59,65 ----
  
  #define BLINK   0x80    /*  blink bit   */
  
+ void    blinkvideo(void);
  char *  cgets(char *_str); 
  void    clreol(void);
  void    clrscr(void);
***************
*** 75,80 ****
--- 76,82 ----
  void    gppconio_init(void);
  void    highvideo(void);
  void    insline(void);
+ void	intensevideo(void);
  void    lowvideo(void);
  int     movetext(int _left, int _top, int _right, int _bottom, int _destleft, int _desttop);
  void    normvideo(void);
- Raw text -