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 6.00 (C)Copyright Blaise Computing Inc. 1983,1987,1989
- *
- **/
-
- #include <dos.h>
-
- #include <bscreens.h>
-
- char scread(pfore,pback)
- int *pfore;
- int *pback;
- {
- union REGS inregs,outregs;
-
- inregs.h.ah = 8;
- inregs.h.bh = (unsigned char) b_curpage;
-
- int86(SC_BIOS_INT,&inregs,&outregs);
-
- *pfore = utlonyb(outregs.h.ah);
- *pback = uthinyb(outregs.h.ah);
-
- return outregs.h.al;
- }