Text attributes
Programmers can give characters on the screen attributes of bold, blink and so on by first defining the current attribute with a HEX(0204) sequence and then enabling it with a HEX(0E). The attribute then stays in effect for all subsequent characters printed until a HEX(0F) character is printed, which disables the attribute and restores to the default characters. A carriage return for end of line will also disable the attribute. A later HEX(0E) will switch on the previous attribute.
Attributes are defined with the HEX(0204 xx yy 0F) sequence, where xx and yy are hex digits. This sequence disables any currently enabled attribute. The first digit controls dim, bright and blink attributes while the second controls reverse video and underline attributes. The two digits can be specified independently. Invalid digits are treated as 00.
xx | 00
02 04 08 |
Not bright, not blink.
Bright. Blink. Bright and Blink. |
yy | 00
02 04 08 |
Off.
Reverse video. Underline. Reverse video and underline. |
The HEX(0204 xx yy 0F) sequence does not itself enable the newly defined attribute which requires a HEX(0E) however if the HEX(0204 xx yy 0E) sequence is used then the attribute is defined and enabled together. An attribute defined in this way is called permanent because it is not disabled at the end of a line but stays in force until an explicit HEX(0F).
Attributes are not affected by HALT or HEX(03). They are disabled but not redefined by RESET. The CLEAR command disables and redefines the current attribute back to the default.