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

View file

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

View file

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

View file

@ -6,7 +6,8 @@ namespace KernelGen3 {
static public class Boot { static public class Boot {
[BootEntry] [BootEntry]
static private void Init() { 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(); //Cosmos.System.Boot.TempDebugTest();
while (true) { while (true) {