i tried to create a simple minimalist kernel that works on protected mode , and i've created a function that should display string on screen by accessing the 0xb8000 adresse but it doesnt work , i tried all clues on the faq , but the problem is persisting .
Here's the C code of the mini kernel :
Code: Select all
#define VIDEOMEM 0xB8000
void print(char*);
int kernel_main(void)
{
print("HELLO");
while(1);
return(0);
}
void print(char* string)
{
unsigned char* fb = (unsigned char*) VIDEOMEM;
char* ptr;
ptr=string;
while(*ptr!='\0'){
*(fb++)=*(ptr++);
*(fb++)=0x57;
}
}
But *((int*)0xb8000)=0x07690748; works perfectly , i dont know why my function doesnt work !!!
Thanks .
PS : sorry , probably bad english .