In this document, we will take a quick look at the SimpleOutputProtocol in UEFI and the basic TUI that it enables in UEFI Applications.

To better understand it, we examine the UEFI Specification and the EDK II source code for SimpleOutputProtocol

UEFI Spec definitions

In the UEFI spec, all console protocols are covered in chapter 12*,* which we can see from the table of contents.

Untitled

The protocol interface is defined as follows

Untitled

In particular, the SetAttribute parameter is of interest, since it can be used to set the foreground and background color of the text. Below is the prototype and possible values of the Attribute, which is the second arg

Untitled

OutputString() method

This method is used to output an existing string (CHAR16) to the output device. It is quite trivial:

Untitled

TODO