X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=test%2Fgeekos_test_vm%2Finclude%2Fgeekos%2Fscreen.h;fp=test%2Fgeekos_test_vm%2Finclude%2Fgeekos%2Fscreen.h;h=8bd39a5f745e71d84acb6132914a956cb530b958;hp=0000000000000000000000000000000000000000;hb=a70930549d1b741704dd7af4e6bb0e89f6f8a519;hpb=afb634a80f946634454a5d067a92aa600227bd93 diff --git a/test/geekos_test_vm/include/geekos/screen.h b/test/geekos_test_vm/include/geekos/screen.h new file mode 100644 index 0000000..8bd39a5 --- /dev/null +++ b/test/geekos_test_vm/include/geekos/screen.h @@ -0,0 +1,58 @@ +/* + * GeekOS text screen output + * Copyright (c) 2001,2003 David H. Hovemeyer + * $Revision: 1.1 $ + * + * This is free software. You are permitted to use, + * redistribute, and modify it as specified in the file "COPYING". + */ + +#ifndef GEEKOS_SCREEN_H +#define GEEKOS_SCREEN_H + +#include +#include + +#define BLACK 0 +#define BLUE 1 +#define GREEN 2 +#define CYAN 3 +#define RED 4 +#define MAGENTA 5 +#define AMBER 6 +#define GRAY 7 +#define BRIGHT 8 +#define ATTRIB(bg,fg) ((fg)|((bg)<<4)) + +#define NUMCOLS 80 +#define NUMROWS 25 + +#define TABWIDTH 8 + +#ifdef GEEKOS + +/* + * VGA hardware stuff, for accessing the text display + * memory and controlling the cursor + */ +#define VIDMEM_ADDR 0xb8000 +#define VIDMEM ((uchar_t*) VIDMEM_ADDR) +#define CRT_ADDR_REG 0x3D4 +#define CRT_DATA_REG 0x3D5 +#define CRT_CURSOR_LOC_HIGH_REG 0x0E +#define CRT_CURSOR_LOC_LOW_REG 0x0F + +void Init_Screen(void); +void Clear_Screen(void); +void Get_Cursor(int* row, int* col); +bool Put_Cursor(int row, int col); +uchar_t Get_Current_Attr(void); +void Set_Current_Attr(uchar_t attrib); +void Put_Char(int c); +void Put_String(const char* s); +void Put_Buf(const char* buf, ulong_t length); +void Print(const char* fmt, ...) __attribute__ ((format (printf, 1, 2))); +void PrintList(const char * fmt, va_list ap); +#endif /* GEEKOS */ + +#endif /* GEEKOS_SCREEN_H */