This commit is contained in:
mterwoord_cp 2009-09-19 13:22:36 +00:00
parent a14b847faf
commit 5461b8b809
4 changed files with 20 additions and 6 deletions

View file

@ -151,6 +151,13 @@ namespace Cosmos.Kernel
{ {
Init(); Init();
uint xTemp = mStartAddress; uint xTemp = mStartAddress;
//CPUBus.Write32(0xE9, 0);
//CPUBus.Write32(0xE9, mStartAddress);
//CPUBus.Write32(0xE9, 0x11111111);
//CPUBus.Write32(0xE9, aLength);
//CPUBus.Write32(0xE9, 0x22222222);
//CPUBus.Write32(0xE9, mStartAddress);
if ((xTemp + aLength) > (mStart + mLength)) if ((xTemp + aLength) > (mStart + mLength))
{ {
Console.WriteLine("Too large memory block allocated!"); Console.WriteLine("Too large memory block allocated!");

View file

@ -630,9 +630,6 @@ namespace Cosmos.IL2CPU {
internal void GenerateMethodForward(MethodInfo aFrom, MethodInfo aTo) { internal void GenerateMethodForward(MethodInfo aFrom, MethodInfo aTo) {
// todo: completely get rid of this kind of trampoline code // todo: completely get rid of this kind of trampoline code
if (MethodInfoLabelGenerator.GenerateLabelName(aFrom.MethodBase) == "System_UInt32__Cosmos_Kernel_CPU_GetAmountOfRAM__") {
Console.Write("");
}
MethodBegin(aFrom); MethodBegin(aFrom);
{ {
var xParams = aTo.MethodBase.GetParameters().AsQueryable(); var xParams = aTo.MethodBase.GetParameters().AsQueryable();

View file

@ -26,6 +26,7 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>

View file

@ -50,12 +50,21 @@ namespace HelloWorld {
//#endregion //#endregion
// Main entry point of the kernel // Main entry point of the kernel
public static void Init() { public static unsafe void Init() {
var xTempBool = false; var xTempBool = false;
//Console.BackgroundColor = ConsoleColor.Green; //Console.BackgroundColor = ConsoleColor.Green;
//TODO: What is this next line for? //TODO: What is this next line for?
//S.ReallyClearScreen(); //S.ReallyClearScreen();
//Console.WriteLine("Congratulations! You just booted C# code."); //Console.Write("Congratulations! You just booted C# code.");
byte* xChars = (byte*)0xB8000;
xChars[1] = 65;
if (true) {
xChars[0] = 75;
} else {
xChars[0] = 78;
}
//Console.WriteLine("Edit Program.cs to create your own Operating System."); //Console.WriteLine("Edit Program.cs to create your own Operating System.");
//Console.WriteLine("Press a key to shutdown..."); //Console.WriteLine("Press a key to shutdown...");