[comp.lang.c++] Zortech C++, V1.6

snguyen@nprdc.arpa (Son Nguyen) (12/20/88)

   I am trying to create a 'curses' library package which is about similar to
'curses' package in UNIX.  In addition, I try to use the 'display' package
provided by Zortech people.   Doing that I stumble into a problem.  I could
get an attribute and a character under the cursor (from the screen) by calling
'disp_pokew (row, col)' which returns an unsigned value.  This unsigned value
composes of an attribute and a character.  What I would like to do is to
seperate the attribute and a character.  Does anyone know how to do so by
either using Zortech routines or making new routines  ?

	Thanks.

By the way:  My compiler version is the Zortech C++, V1.06 (not V1.6)

bright@Data-IO.COM (Walter Bright) (12/22/88)

In article <1195@arctic.nprdc.arpa> snguyen@nprdc.arpa (Son Nguyen) writes:
<   I am trying to create a 'curses' library package which is about similar to
<'curses' package in UNIX.  In addition, I try to use the 'display' package
<provided by Zortech people.   Doing that I stumble into a problem.  I could
<get an attribute and a character under the cursor (from the screen) by calling
<'disp_pokew (row, col)' which returns an unsigned value.  This unsigned value
<composes of an attribute and a character.  What I would like to do is to
<seperate the attribute and a character.  Does anyone know how to do so by
<either using Zortech routines or making new routines  ?

To get the character:
	disp_peekw(row,col) & 0xFF
To get the attribute:
	disp_peekw(row,col) >> 8

P.S. If, when you finish it, you would like to make your package public domain,
let me know and I'll put it on the Zortech BBS.