'C++ prints white blocks instead of Text while writing direct to Videomemory
I'm currently working on my own little os kernel but i'm new to osdev as well as c++. So after writing my bootloader I researched how to write a simple print function in C++ and came up with this:
void print(int color, const char *string){
volatile char *video = (volatile char*)0xB8000;
while( *string != 0 )
{
*video++ = *string++;
*video++ = color;
}
}
extern "C" void main(){
print((255,255,255), "Hello World");
return;
}
The Problem is it doesn't print the text insertet it prints white(color given to the print statement) blocks with the lenght of the text inserted.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
