I have the following code:
This code is intended to be part of my "kernel" for my "OS".Code:void Print(char Text[10]) { char *vidmem = (char *) 0xb8002; int I = 0; while (I != 5) { if (Text[I] == '\n') { CurrentPosition = CurrentPosition + 80; } else { vidmem[CurrentPosition] = Text[I]; } I++; CurrentPosition = CurrentPosition + 2; } return; }
The idea of the function is that it takes a message and prints the letters on the screen. I get no errors compiling.
When I go to run the code though, the program doesn't even seem to print anything, it just shutsdown. I know that it should work because the following code
Works just fine. So I think the problem is that somehow my loop is stuffing me up. Any ideas?Code:char *vidmem = (char *) 0xb8002; vidmem = 'A';