Weird behavior when writing to 0xB8000 / corrupted pointer
问题 I'm currently developing an OS kernel from scratch. I want to use a function to write characters on the screen , using the 0xB8000 memory location. the problem is the following : I use : void video_write(const unsigned char *string , char color ){ unsigned char *p = (unsigned char*) string ; char *c = (char*) (VIDEO_MEMORY ); //VIDEO_MEMORY is 0XB8000 while(*p != '\0') { *c = p[0] ; c++ ; *c = color ; c++ ; p++ ; } } void clear_screen(){ char *c = (char*) VIDEO_MEMORY ; int i = 0 ; for(i ; i