Add a test suite for etags
[emacs.git] / test / etags / cp-src / screen.cpp
blob1958a19d6281383c472637a1b68e52c6a6d3d9df
1 /* ======================================================================= */
2 /* SCREEN.CPP */
3 /* ======================================================================= */
5 #include "stdio.h"
6 #include "stdlib.h"
7 #include "dos.h"
9 #include "screen.h"
11 /* ----------------------------------------------------------------------- */
12 /* Cursor Position and Screen Buffering Functions */
13 /* ----------------------------------------------------------------------- */
15 unsigned char cursor_x, cursor_y;
16 static union REGS regs;
18 void goto_xy(unsigned char x, unsigned char y)
20 regs.h.ah = 2;
21 regs.h.bh = 0;
22 regs.h.dh = y;
23 regs.h.dl = x;
24 int86(0x10, &regs, &regs);
27 void hide_cursor(void)
29 goto_xy(0, NUM_ROWS);
32 void cursor_position(void)
34 regs.h.ah = 3;
35 regs.h.bh = 0;
36 int86(0x10, &regs, &regs);
37 cursor_x = regs.h.dl;
38 cursor_y = regs.h.dh;
41 void clear_screen(void)
43 unsigned int i, j;
44 char far *p;
46 p = SCREEN_START;
47 for (i = 0; i < NUM_ROWS; i++)
48 for (j = 0; j < 80; j++)
50 *p++ = ' ';
51 *p++ = LIGHTGRAY;
55 void write_xyc(int x, int y, char c)
57 char far *p;
59 p = SCREEN_FP(x, y);
60 *p++ = c;
61 *p = LIGHTGRAY;