home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / sharewar / dos / program / gs300sr1 / gs300sr1.exe / GDEVEVGA.C < prev    next >
C/C++ Source or Header  |  1994-07-27  |  2KB  |  54 lines

  1. /* Copyright (C) 1993 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of Aladdin Ghostscript.
  4.   
  5.   Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  6.   or distributor accepts any responsibility for the consequences of using it,
  7.   or for whether it serves any particular purpose or works at all, unless he
  8.   or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  9.   License (the "License") for full details.
  10.   
  11.   Every copy of Aladdin Ghostscript must include a copy of the License,
  12.   normally in a plain ASCII text file named PUBLIC.  The License grants you
  13.   the right to copy, modify and redistribute Aladdin Ghostscript, but only
  14.   under certain conditions described in the License.  Among other things, the
  15.   License requires that the copyright notice and this notice be preserved on
  16.   all copies.
  17. */
  18.  
  19. /* gdevpcfb.c */
  20. /* IBM PC EGA and VGA display drivers for Ghostscript */
  21. /* This is fundamentally an EGA driver with some parameters */
  22. /* that allow it to drive larger displays. */
  23. #include "memory_.h"
  24. #include "gx.h"
  25. #include "gserrors.h"
  26. #include "gxdevice.h"
  27. #include "gdevpcfb.h"
  28.  
  29. /* ------ Internal routines ------ */
  30.  
  31. /* We can't catch signals.... */
  32. void
  33. ega_set_signals(gx_device *dev)
  34. {
  35. }
  36.  
  37. /* Read the device mode */
  38. int
  39. ega_get_mode(void)
  40. {    registers regs;
  41.     regs.h.ah = 0xf;
  42.     int86(0x10, ®s, ®s);
  43.     return regs.h.al;
  44. }
  45.  
  46. /* Set the device mode */
  47. void
  48. ega_set_mode(int mode)
  49. {    registers regs;
  50.     regs.h.ah = 0;
  51.     regs.h.al = mode;
  52.     int86(0x10, ®s, ®s);
  53. }
  54.