
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - disp_peekw
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
disp_peekw
Usage
#include <disp.h>
unsigned disp_peekw(int row,int col);
Description
Reads a combined attribute/character from video display at position
row, col. The components can be separated out as follows:
character = charatt & 0xff;
and
attribute = charatt >> 8;
Example
#include <disp.h>
main()
{
unsigned chatt;
disp_open();
disp_move(0,0);
disp_eeop();
disp_move(4,4);
disp_puts("hello world");
chatt = disp_peekw(4,4);
disp_printf("Char at 4,4 is %c with attr %2x"
,chatt&0xff,chatt>>8);
disp_close();
}
Return Value
The combined character and attribute as an unsigned integer. The
attribute is returned in the high byte, and the character in the low
byte.
See Also: Display_package disp_pokew disp_peekbox disp_pokebox
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson