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>
14 #include <geekos/fmtout.h>
25 #define ATTRIB(bg,fg) ((fg)|((bg)<<4))
35 * VGA hardware stuff, for accessing the text display
36 * memory and controlling the cursor
38 #define VIDMEM_ADDR 0xb8000
39 #define VIDMEM ((uchar_t*) VIDMEM_ADDR)
40 #define CRT_ADDR_REG 0x3D4
41 #define CRT_DATA_REG 0x3D5
42 #define CRT_CURSOR_LOC_HIGH_REG 0x0E
43 #define CRT_CURSOR_LOC_LOW_REG 0x0F
45 void Init_Screen(void);
46 void Clear_Screen(void);
47 void Get_Cursor(int* row, int* col);
48 bool Put_Cursor(int row, int col);
49 uchar_t Get_Current_Attr(void);
50 void Set_Current_Attr(uchar_t attrib);
52 void Put_String(const char* s);
53 void Put_Buf(const char* buf, ulong_t length);
54 void Print(const char* fmt, ...) __attribute__ ((format (printf, 1, 2)));
55 void PrintList(const char * fmt, va_list ap);
60 #endif /* GEEKOS_SCREEN_H */