Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


(no commit message)
[palacios.git] / palacios / include / geekos / screen.h
1 /*
2  * GeekOS text screen output
3  * Copyright (c) 2001,2003 David H. Hovemeyer <daveho@cs.umd.edu>
4  * $Revision: 1.1.1.1 $
5  * 
6  * This is free software.  You are permitted to use,
7  * redistribute, and modify it as specified in the file "COPYING".
8  */
9
10 #ifndef GEEKOS_SCREEN_H
11 #define GEEKOS_SCREEN_H
12
13 #include <geekos/ktypes.h>
14
15 #define BLACK   0
16 #define BLUE    1
17 #define GREEN   2
18 #define CYAN    3
19 #define RED     4
20 #define MAGENTA 5
21 #define AMBER   6
22 #define GRAY    7
23 #define BRIGHT  8
24 #define ATTRIB(bg,fg) ((fg)|((bg)<<4))
25
26 #define NUMCOLS 80
27 #define NUMROWS 25
28
29 #define TABWIDTH 8
30
31 #ifdef GEEKOS
32
33 /*
34  * VGA hardware stuff, for accessing the text display
35  * memory and controlling the cursor
36  */
37 #define VIDMEM_ADDR 0xb8000
38 #define VIDMEM ((uchar_t*) VIDMEM_ADDR)
39 #define CRT_ADDR_REG 0x3D4
40 #define CRT_DATA_REG 0x3D5
41 #define CRT_CURSOR_LOC_HIGH_REG 0x0E
42 #define CRT_CURSOR_LOC_LOW_REG 0x0F
43
44 void Init_Screen(void);
45 void Clear_Screen(void);
46 void Get_Cursor(int* row, int* col);
47 bool Put_Cursor(int row, int col);
48 uchar_t Get_Current_Attr(void);
49 void Set_Current_Attr(uchar_t attrib);
50 void Put_Char(int c);
51 void Put_String(const char* s);
52 void Put_Buf(const char* buf, ulong_t length);
53 void Print(const char* fmt, ...) __attribute__ ((format (printf, 1, 2)));
54
55 #endif  /* GEEKOS */
56
57 #endif  /* GEEKOS_SCREEN_H */