2 * GeekOS text screen output
3 * Copyright (c) 2001,2003 David H. Hovemeyer <daveho@cs.umd.edu>
6 * This is free software. You are permitted to use,
7 * redistribute, and modify it as specified in the file "COPYING".
10 #ifndef GEEKOS_SCREEN_H
11 #define GEEKOS_SCREEN_H
13 #include <geekos/ktypes.h>
24 #define ATTRIB(bg,fg) ((fg)|((bg)<<4))
34 * VGA hardware stuff, for accessing the text display
35 * memory and controlling the cursor
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
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);
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)));
57 #endif /* GEEKOS_SCREEN_H */