flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > UEFI how to string in different colors |
Author |
|
Feryno 28 May 2016, 13:27
Hi, the only one way to change the background and foreground colors for OutputString() is by:
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SetAttribute() http://wiki.phoenix.com/wiki/index.php/EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL#SetAttribute.28.29 I've never heard about control sequences used to change colors, but I did only small work in uefi and it was few years ago. |
|||
28 May 2016, 13:27 |
|
MrFox 11 Nov 2016, 10:40
Yes, SetAttribute works. EFI color constants are defined in the spec.
I'm soon going to make another tutorial on Simple Text Output to print a colored string centered on the screen (to show usage of ClearScreen, GetMode, SetAttribute, SetCursorPos,OutputString). Different colors within one string require a sequence of SetAttribute-OutputString's. I've heard about escape sequences (also defined in the Spec) but never tried them. |
|||
11 Nov 2016, 10:40 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.