Browse Source

[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 10 years ago
parent
commit
f903ddaac0
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/arch/i386/firmware/pcbios/bios_console.c

+ 6
- 0
src/arch/i386/firmware/pcbios/bios_console.c View File

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

Loading…
Cancel
Save