// Driver implementation for Jank's text frame buffer // Buffer can display 80 columns by 25 Rows // Start of buffer is at (real)address 0x000B8000 // Memory at this section is divided into 16-bit cells // | 15-8 | 7-4 | 0-3 // | Asci | FG | BG #include "framebuffer.h" static char* Frame_Buffer = (char*)FRAME_BUFFER_ADDR; //static char* Frame_Buffer_End = (char*)(FRAME_BUFFER_ADDR + AREA); // Writes character to a given cell in the framebuffer // @cell parameter is the logical (linear)index into the buffer // _not_ the actual offset from the buffer addr // also proper location is caller's responsibility void write_cell_fb(unsigned cell, char c, char fg, char bg) { Frame_Buffer[cell] = c; Frame_Buffer[cell+1] = (fg & 0x0f << 4) | (bg & 0x0f); } /* should be passing in a cell-position for position param*/ void print_fb(char* str, unsigned position) { unsigned relative_end = position + strlen(str); for(unsigned i = position; i