//#include "vga.h" #include #include unsigned char* TextVideoRam = (unsigned char*)0xB8000; void vga03h_cursor(int x, int y) { unsigned temp = y*80 + x; outportb (0x3D4, 14); outportb (0x3D5, temp >> 8); outportb (0x3D4, 15); outportb (0x3D5, temp); } void vga03h_putc (int x, int y, unsigned char c) { TextVideoRam[2*(y*80+x)] = c; } unsigned char vga03h_getc (int x, int y) { return TextVideoRam[2*(y*80+x)]; } void vga03h_putcolor (int x, int y, unsigned char c) { TextVideoRam[2*(y*80+x)+1] = c; } unsigned char vga03h_getcolor (int x, int y) { return TextVideoRam[2*(y*80+x)+1]; } void vga03h_install() { ConsoleScreen screen = { 80, 25, 0x07, vga03h_cursor, vga03h_putc, vga03h_getc, vga03h_putcolor, vga03h_getcolor}; ConsoleInstall (screen); clrscr(); }