예제 #1
0
        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]);
	        }
        }
예제 #2
0
        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]);
		        }
	        }
        }
예제 #3
0
        public static void PrintLine(SampleKernel.String text)
        {
	        Print(text);
	        Print("\n");
        }
예제 #4
0
        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]);
                }
	        }
        }