mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-22 05:48:37 +00:00
This commit is contained in:
parent
a14b847faf
commit
5461b8b809
4 changed files with 20 additions and 6 deletions
|
|
@ -151,6 +151,13 @@ namespace Cosmos.Kernel
|
|||
{
|
||||
Init();
|
||||
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))
|
||||
{
|
||||
Console.WriteLine("Too large memory block allocated!");
|
||||
|
|
|
|||
|
|
@ -630,9 +630,6 @@ namespace Cosmos.IL2CPU {
|
|||
|
||||
internal void GenerateMethodForward(MethodInfo aFrom, MethodInfo aTo) {
|
||||
// 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);
|
||||
{
|
||||
var xParams = aTo.MethodBase.GetParameters().AsQueryable();
|
||||
|
|
@ -650,7 +647,7 @@ namespace Cosmos.IL2CPU {
|
|||
}
|
||||
|
||||
if (xFieldAccessAttrib != null) {
|
||||
// field access
|
||||
// field access
|
||||
new Comment("Loading address of field '" + xFieldAccessAttrib.Name + "'");
|
||||
Ldarg(aFrom, 0);
|
||||
Ldflda(aFrom, xFieldAccessAttrib.Name);
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
|
|
|
|||
|
|
@ -50,12 +50,21 @@ namespace HelloWorld {
|
|||
//#endregion
|
||||
|
||||
// Main entry point of the kernel
|
||||
public static void Init() {
|
||||
public static unsafe void Init() {
|
||||
var xTempBool = false;
|
||||
//Console.BackgroundColor = ConsoleColor.Green;
|
||||
//TODO: What is this next line for?
|
||||
//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("Press a key to shutdown...");
|
||||
|
|
|
|||
Loading…
Reference in a new issue