Ver código fonte

[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>
tags/v1.20.1
Christian Nilsson 9 anos atrás
pai
commit
f903ddaac0
1 arquivos alterados com 6 adições e 0 exclusões
  1. 6
    0
      src/arch/i386/firmware/pcbios/bios_console.c

+ 6
- 0
src/arch/i386/firmware/pcbios/bios_console.c Ver arquivo

@@ -43,6 +43,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
43 43
 #define ATTR_FCOL_YELLOW	0x06
44 44
 #define ATTR_FCOL_WHITE		0x07
45 45
 
46
+#define ATTR_BLINK		0x80
47
+
46 48
 #define ATTR_BCOL_MASK		0x70
47 49
 #define ATTR_BCOL_BLACK		0x00
48 50
 #define ATTR_BCOL_BLUE		0x10
@@ -141,8 +143,12 @@ static void bios_handle_sgr ( struct ansiesc_context *ctx __unused,
141 143
 			bios_attr = ATTR_DEFAULT;
142 144
 		} else if ( aspect == 1 ) {
143 145
 			bios_attr |= ATTR_BOLD;
146
+		} else if ( aspect == 5 ) {
147
+			bios_attr |= ATTR_BLINK;
144 148
 		} else if ( aspect == 22 ) {
145 149
 			bios_attr &= ~ATTR_BOLD;
150
+		} else if ( aspect == 25 ) {
151
+			bios_attr &= ~ATTR_BLINK;
146 152
 		} else if ( ( aspect >= 30 ) && ( aspect <= 39 ) ) {
147 153
 			bios_attr &= ~ATTR_FCOL_MASK;
148 154
 			bios_attr |= bios_attr_fcols[ aspect - 30 ];

Carregando…
Cancelar
Salvar