[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Attr FastTTT
Purpose To combine foreground and background colors as a single
attribute byte.
Result type byte;
Declaration Attr(F,B:byte):byte;
F is the foreground color (0..15)
B is the background color (0..15)
Uses FastTTT.
Remarks The video memory for an 80 by 25 character screen is
composed of 2000 bytes of data. There is an attribute byte
and a character byte for each of the 1000 character
positions on the screen. This simple function will combine a
foreground color (F) with a background color (B) to form a
single attribute byte.
The valid color ranges are 0 to 15. (Refer to Appendix B for
a color table.)
If a background color is set greater than 7 then "flashing"
characters will result.
Example
USES FASTTTT;
VAR MSG_COL : BYTE;
BEGIN
MSG_COL := ATTR(15,4);
END.
The color attribute MSG_COL would be set to white on a red background.
See Also:
FastWrite
PlainWrite
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson