home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a120 / 1.ddi / WATCOM_C / WAT24.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-14  |  824 b   |  41 lines

  1. /*------------------------------------------------------------------*/
  2. /* ╡{ªí└╔ªW║┘: wat24.c                                              */
  3. /*------------------------------------------------------------------*/
  4. #include <dos.h>
  5. #include <bios.h>
  6. #include <stdio.h>
  7.  
  8. #define BIOS_VIDEO 0x10
  9.  
  10. void interrupt far video_func(void);
  11. void (interrupt far *pre_func)(void);
  12.  
  13. void main()
  14. {
  15.   union REGS xr, yr;
  16.   unsigned c;
  17.   unsigned intno = 0x10;
  18.  
  19.   pre_func = _dos_getvect(intno);
  20.  
  21.   _disable();
  22.   _dos_setvect(intno, video_func);
  23.   _enable();
  24.  
  25.   xr.h.ah = 0x87;
  26.   xr.h.al = 0x00;
  27.   xr.w.cx = 250;
  28.   xr.w.dx = 250;
  29.   xr.w.si = 150;
  30.   int86(0x10, &xr, &yr);
  31.  
  32.   _disable();
  33.   _dos_setvect(intno, pre_func);
  34.   _enable();
  35. }
  36.  
  37. void interrupt far video_func(void)
  38. {
  39.   _chain_intr(pre_func);
  40. }
  41.