flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > OS Construction > UEFI how to string in different colors

Author
Thread Post new topic Reply to topic
zhak



Joined: 12 Apr 2005
Posts: 473
Location: Belarus
UEFI how to string in different colors
UEFI standard tells about control sequences that can be used with OutputString function of the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL. It seems I've tried all possible variants of escape sequences to apply different colors within one string. None worked.

Maybe anybody knows if it's possible (and how) to apply different colors within one string?
Thanks in advance
Post 27 May 2016, 19:12
View user's profile Send private message Reply with quote
Feryno



Joined: 23 Mar 2005
Posts: 438
Location: Czech republic, Slovak republic
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.
Post 28 May 2016, 13:27
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
MrFox



Joined: 17 Aug 2016
Posts: 52
Location: Russia
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.
Post 11 Nov 2016, 10:40
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.