private static unsafe void Print(SampleKernel.String text) { char* DisplayMemoryPtr = (char*)0xB8000; int i; for(i = 0; i < text.length; i++) { DisplayMemoryPtr[i] = (char)(0x0200 | text[i]); } }
public static unsafe void Print(SampleKernel.String text) { char* DisplayMemoryPtr = (char*)0xB8000; for(int i = 0; i < text.length; i++) { if(CurrentLocation == 2000) { ShiftDisplayUpOneLine(); CurrentLocation -= 80; } if(text[i] == '\n') { CurrentLocation += (80 - (CurrentLocation % 80)); } else { DisplayMemoryPtr[CurrentLocation++] = (char)(0x0200 | text[i]); } } }
public static void PrintLine(SampleKernel.String text) { Print(text); Print("\n"); }
private static unsafe void Print(SampleKernel.String text) { char* DisplayMemoryPtr = (char*)0xB8000; for(int i = 0; i < text.length; i++) { if (text[i] == '\n') { CurrentLocation += (80 - (CurrentLocation % 80)); } else { DisplayMemoryPtr[CurrentLocation++] = (char)(0x0200 | text[i]); } } }