From: Christian Nilsson Date: Sat, 25 Apr 2015 23:18:37 +0000 (+0200) Subject: [bios] Add ANSI blink attribute X-Git-Tag: v1.20.1~785 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f903ddaac0574cb2031d742ee29c8ee1ae136225;p=thirdparty%2Fipxe.git [bios] Add ANSI blink attribute Expose the high bit of the VGA text attribute byte via the ANSI SGR parameters 5 ("blink on") and 25 ("blink off"). Note that some video cards (and virtual machines) may display a high intensity background colour instead of blinking text. Signed-off-by: Christian Nilsson Modified-by: Michael Brown Signed-off-by: Michael Brown --- diff --git a/src/arch/i386/firmware/pcbios/bios_console.c b/src/arch/i386/firmware/pcbios/bios_console.c index 7b2f8ade4..63413cdc1 100644 --- a/src/arch/i386/firmware/pcbios/bios_console.c +++ b/src/arch/i386/firmware/pcbios/bios_console.c @@ -43,6 +43,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #define ATTR_FCOL_YELLOW 0x06 #define ATTR_FCOL_WHITE 0x07 +#define ATTR_BLINK 0x80 + #define ATTR_BCOL_MASK 0x70 #define ATTR_BCOL_BLACK 0x00 #define ATTR_BCOL_BLUE 0x10 @@ -141,8 +143,12 @@ static void bios_handle_sgr ( struct ansiesc_context *ctx __unused, bios_attr = ATTR_DEFAULT; } else if ( aspect == 1 ) { bios_attr |= ATTR_BOLD; + } else if ( aspect == 5 ) { + bios_attr |= ATTR_BLINK; } else if ( aspect == 22 ) { bios_attr &= ~ATTR_BOLD; + } else if ( aspect == 25 ) { + bios_attr &= ~ATTR_BLINK; } else if ( ( aspect >= 30 ) && ( aspect <= 39 ) ) { bios_attr &= ~ATTR_FCOL_MASK; bios_attr |= bios_attr_fcols[ aspect - 30 ];