1 /* ======================================================================= */
2 /*                                 SCREEN.H                                */
3 /* ======================================================================= */
4 
5 // This stuff is entirely non-portable MSDOS-ish code. Note the hardware
6 // address below, for the standard location of the EGA video buffer.
7 
8 #if !defined(__COLORS)
9 #define __COLORS
10 
11 enum COLORS {
12     BLACK,          /* dark colors */
13     BLUE,
14     GREEN,
15     CYAN,
16     RED,
17     MAGENTA,
18     BROWN,
19     LIGHTGRAY,
20     DARKGRAY,       /* light colors */
21     LIGHTBLUE,
22     LIGHTGREEN,
23     LIGHTCYAN,
24     LIGHTRED,
25     LIGHTMAGENTA,
26     YELLOW,
27     WHITE
28 };
29 #endif
30 
31 #define SCREEN_FP(x,y) \
32     ((char far *) (0xB8000000L | ((unsigned) (160 * (y) + 2 * (x)))))
33 #define SCREEN_START   SCREEN_FP(0, 0)
34 
35 void goto_xy(unsigned char x, unsigned char y);
36 void hide_cursor(void);
37 void cursor_position(void);
38 void clear_screen(void);
39 void write_xyc(int x, int y, char c);
40