home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name scread -- Return the displayed character and attribute
- *
- * Synopsis ch = scread(pfore,pback);
- *
- * char ch Returned character
- * int *pfore Foreground attribute
- * int *pback Background attribute
- *
- * Description This function returns the character at the current
- * cursor position on the current display page.
- *
- * The display attribute byte at the current position is
- * returned as the foreground and background display
- * attributes. However, these values are undefined if the
- * screen is in a graphics mode.
- *
- * Returns ch Character read
- * *pfore Foreground attribute
- * *pback Background attribute
- *
- * Version 3.0 (C)Copyright Blaise Computing Inc. 1983, 1984, 1986
- *
- **/
-
- #include <bscreen.h>
-
- char scread(pfore,pback)
- int *pfore;
- int *pback;
- {
- int ax,bx,cx,dx,flags;
-
- ax = utbyword(8,0);
- bx = utbyword(b_curpage,0);
-
- bios(16,&ax,&bx,&cx,&dx,&flags);
-
- *pfore = utlonyb(uthibyte(ax));
- *pback = uthinyb(uthibyte(ax));
-
- return((char) utlobyte(ax));
- }