diff --git a/framebuffer.c b/framebuffer.c index d87dac3..8bca41e 100644 --- a/framebuffer.c +++ b/framebuffer.c @@ -10,25 +10,26 @@ 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 - // Safety handled by caller function + // @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(unsigned cell, char c, char fg, char bg) { +void writech_fb(unsigned cell, char c, char fg, char bg) { Frame_Buffer[cell] = c; Frame_Buffer[cell+1] = (fg & 0x0f << 4) | (bg & 0x0f); } -void clear_buffer() { - char* fp = Frame_Buffer; - while(fp!=Frame_Buffer_End) { - *fp = 0x00; - } -} -void print(char* str) { - for(unsigned i =0;i