home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / EMXLIB8F.ZIP / EMX / LIB / VIDEO / VGOTOXY.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-02  |  633 b   |  29 lines

  1. /* vgotoxy.c (emx+gcc) -- Copyright (c) 1987-1993 by Eberhard Mattes */
  2.  
  3. #include <stdlib.h>
  4. #include <dos.h>
  5. #define INCL_VIO
  6. #include <os2emx.h>
  7. #include <sys/video.h>
  8. #include "video2.h"
  9.  
  10. void v_gotoxy (int x, int y)
  11. {
  12.   if ((unsigned)x < _v_width && (unsigned)y < _v_height)
  13.     {
  14.       _v_x = x; _v_y = y;
  15.       if (_osmode == OS2_MODE)
  16.         VioSetCurPos (y, x, 0);
  17.       else
  18.         {
  19.           union REGS r;
  20.           
  21.           r.h.ah = 0x02;
  22.           r.h.bh = 0x00;
  23.           r.h.dl = (unsigned char)x;
  24.           r.h.dh = (unsigned char)y;
  25.           _int86 (0x10, &r, &r);
  26.         }
  27.     }
  28. }
  29.