This commit is contained in:
José Pedro 2017-08-08 19:35:28 +01:00
commit c5bc6f9023
4 changed files with 10 additions and 12 deletions

View file

@ -2,17 +2,14 @@
namespace Cosmos.CPU.x86 {
static public class TempDebug {
static public void ShowText() {
unsafe static byte* mPtr = (byte*)(0xB8000 - 1);
static public void ShowText(char aChar) {
unsafe {
byte* xTest = (byte*)0xB8000;
*xTest = 65;
xTest = (byte*)0xB8001;
*xTest = 0x0A;
mPtr++;
*mPtr = (byte)aChar;
xTest = (byte*)0xB8002;
*xTest = 90;
xTest = (byte*)0xB8003;
*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();
CPU.x86.TempDebug.ShowText('C');
}
return 0;
}

View file

@ -24,7 +24,7 @@ namespace Cosmos.HAL {
mAll.Add(aDevice);
if (aDevice is Processor) {
mProcessor = (Processor)aDevice;
}
}
}

View file

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