From e2315fc3cc6ff6ebb3bf2087cbb0aabf49a73d71 Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Wed, 23 Jan 2019 01:12:36 -0800 Subject: [PATCH] fixing print function slowly but surely --- framebuffer.c | 26 ++++---------------------- framebuffer.h | 3 ++- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/framebuffer.c b/framebuffer.c index fad5bdb..d87dac3 100644 --- a/framebuffer.c +++ b/framebuffer.c @@ -5,21 +5,6 @@ // Memory at this section is divided into 16-bit cells // | 15-8 | 7-4 | 0-3 // | Asci | FG | BG -// The following colors are available(from 0x0 to 0xF): - // Black Blue Green Cyan Red Magenta - // Brown LightGrey DarkGrey LightBlue LightGreen - // LightCyan LightRed LightMagenta LightBrown White - -/* -enum typedef Colors{ - Black, Blue, Green, - Cyan, Red, Magenta, - Brown, LightGrey, DarkGrey, - LightBlue, LightGreen, LightCyan, - LightRed, LightMagenta, LightBrown, - White, -}; -*/ #include "framebuffer.h" static char* Frame_Buffer = (char*)FRAME_BUFFER_ADDR; @@ -38,15 +23,12 @@ void clear_buffer() { *fp = 0x00; } } -static void print(char* str) { - unsigned idx = 0; - char* c = str; - while(c != 0x00) { - write_cell(idx, *c, Green, White); - idx += 2; +void print(char* str) { + for(unsigned i =0;i