home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / pc_hw / co80 / scgetch.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-25  |  406 b   |  19 lines

  1. /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
  2. #include "sc.h"
  3.  
  4. void    
  5. ScreenGetChar(int *_ch, int *_attr, int _x, int _y)
  6. {
  7.   int s;
  8.  
  9.   if ((_x < 0) || (_y < 0))
  10.     return;
  11.   if ((_x >= ScreenCols()) || (_y >= ScreenRows()))
  12.     return;
  13.   s = _farpeekw(dossel, co80 + (_x+_y*ScreenCols())*2);
  14.   if (_ch)
  15.     *_ch = s & 0xff;
  16.   if (_attr)
  17.     *_attr = (s >> 8) & 0xff;
  18. }
  19.