I am trying to create a simple kernel and when I print to 0xb8000 in video memory using this code:
void screenPrintString(const char *str, uint_8 color, int x, int y){ uint_16 position = screenCursorGetPositionFromCord(x, y); uint_8 *strPtr = (uint_8 *)str; while (*strPtr != 0) { *((volatile uint_8 *)VGA_ADDRESS + position*2) = *strPtr; // *((volatile uint_8 *)VGA_ADDRESS + position + 1) = color; strPtr++; position += 1; } screenCursorSetPosition(position);}
I get an unexpected output like below.
I know that I have enabled video mode '3' with interrupt hex 10 in the bootsector and I have also made sure my kernel code is being loaded.
Also, I intentionally placed the text to be at that offset in the code, if you are wondering.
I'm just wondering how to get rid of the bar as you can see in the screenshot.
Any help will be appreciated.