This commit is contained in:
Kudzu 2017-08-08 14:30:52 -04:00
parent 9a96296b92
commit 2860386c4e
3 changed files with 9 additions and 8 deletions

View file

@ -2,13 +2,14 @@
namespace Cosmos.CPU.x86 {
static public class TempDebug {
static public void ShowText(byte aChar, int aOffset) {
unsafe static byte* mPtr = (byte*)(0xB8000 - 1);
static public void ShowText(char aChar) {
unsafe {
byte* xTest = (byte*)0xB8000 + aOffset * 2;
*xTest = aChar;
mPtr++;
*mPtr = (byte)aChar;
xTest++;
*xTest = 0x0A;
mPtr++;
*mPtr = 0x0A;
}
}
}

View file

@ -6,7 +6,7 @@ namespace Cosmos.Platform.PC.Devices {
public class Processor : HAL.Devices.Processor {
public override ulong SetOption(uint aID, ulong aValue = 0) {
if (aID == 0) {
CPU.x86.TempDebug.ShowText(66, 1);
CPU.x86.TempDebug.ShowText('C');
}
return 0;
}

View file

@ -6,8 +6,8 @@ namespace KernelGen3 {
static public class Boot {
[BootEntry]
static private void Init() {
Cosmos.CPU.x86.TempDebug.ShowText(65, 0);
Cosmos.CPU.x86.TempDebug.ShowText(66, 1);
Cosmos.CPU.x86.TempDebug.ShowText('A');
Cosmos.CPU.x86.TempDebug.ShowText('c');
//Cosmos.System.Boot.TempDebugTest();
while (true) {