david/ipxe
Archived
1
0

[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 <nikize@gmail.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Christian Nilsson 2015-04-26 01:18:37 +02:00 committed by Michael Brown
parent 24112d91a0
commit f903ddaac0

View File

@ -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 ];