]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[bios] Add ANSI blink attribute
authorChristian Nilsson <nikize@gmail.com>
Sat, 25 Apr 2015 23:18:37 +0000 (01:18 +0200)
committerMichael Brown <mcb30@ipxe.org>
Wed, 22 Jul 2015 15:46:02 +0000 (16:46 +0100)
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>
src/arch/i386/firmware/pcbios/bios_console.c

index 7b2f8ade43e9d02932910cfafb3aefda7aefe353..63413cdc19278978410d1ce422804bb1f6534389 100644 (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 ];