Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>disp_peekw</b> http://www.X-Hacker.org [<<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>
   #include <stdlib.h>

   int 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 EXIT_SUCCESS;
   }

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



See Also: disp_pokew disp_peekbox disp_pokebox

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson