A poorly written OS for the x86 arch. (WIP)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
eOS/drivers/vga.h

26 lines
659 B

#define VGA_ADDRESS 0xb8000
#define VGA_ADDRESS_MAX 0xb8fa0
#define DEFAULT_COLOR 0x07
#define URGENT_COLOR 0x0c
3 years ago
#define SUCCESS_COLOR 0x0a
#define MAX_ROWS 25
#define MAX_COLS 80
static unsigned int cursor_row;
static unsigned int cursor_col;
enum align {LEFT, RIGHT, MIDDLE};
3 years ago
char* get_memory_charpos(unsigned int col, unsigned int row);
void writechar(char c, unsigned int col, unsigned int row, int colorcode);
void clear_screen();
void clear_row(unsigned int row);
void set_cursor_pos();
void print();
void println();
3 years ago
void printint(int i, int attribute_byte);
void printalign(char* str, int attribute_byte, enum align alignment);
void vga_init();