From 2eb24900124cb45431e56589eee8008a4c699d6a Mon Sep 17 00:00:00 2001 From: mterwoord_cp <7cd3fd84a0151ea055c2f79e4d2eef9576fe9afesxUZAwxD> Date: Mon, 29 Oct 2007 16:54:47 +0000 Subject: [PATCH] Kernel console works again --- source/Cosmos.Kernel.Boot/BootDrv.cs | 3 ++- source/Indy.IL2CPU.Assembler.X86.Native/Assembler.cs | 3 +-- source/Indy.IL2CPU.IL.X86/LdStr.cs | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/Cosmos.Kernel.Boot/BootDrv.cs b/source/Cosmos.Kernel.Boot/BootDrv.cs index b34a574a4..6e8c14283 100644 --- a/source/Cosmos.Kernel.Boot/BootDrv.cs +++ b/source/Cosmos.Kernel.Boot/BootDrv.cs @@ -14,7 +14,8 @@ namespace Cosmos.Kernel.Boot { public static void Main() { Console.WriteLine("This is CosmOS Booting..."); -// if (!BootInfoSet) { + Console.WriteLine("This is CosmOS Booting..."); + // if (!BootInfoSet) { // Console.WriteLine("No boot info available, terminating!"); // return; // } diff --git a/source/Indy.IL2CPU.Assembler.X86.Native/Assembler.cs b/source/Indy.IL2CPU.Assembler.X86.Native/Assembler.cs index 860c02888..cefee2187 100644 --- a/source/Indy.IL2CPU.Assembler.X86.Native/Assembler.cs +++ b/source/Indy.IL2CPU.Assembler.X86.Native/Assembler.cs @@ -99,9 +99,8 @@ namespace Indy.IL2CPU.Assembler.X86.Native { mOutputWriter.WriteLine(" mov esp,Kernel_Stack "); mOutputWriter.WriteLine(""); mOutputWriter.WriteLine("; some more startups todo"); - //mOutputWriter.WriteLine(" push ebx"); mOutputWriter.WriteLine(" cli"); - mOutputWriter.WriteLine(" xchg bx, bx"); + mOutputWriter.WriteLine(" push ebx"); mOutputWriter.WriteLine(" call " + EntryPointName); mOutputWriter.WriteLine(" .loop:"); mOutputWriter.WriteLine(" xchg bx, bx"); diff --git a/source/Indy.IL2CPU.IL.X86/LdStr.cs b/source/Indy.IL2CPU.IL.X86/LdStr.cs index 1ced0b365..d11c1a217 100644 --- a/source/Indy.IL2CPU.IL.X86/LdStr.cs +++ b/source/Indy.IL2CPU.IL.X86/LdStr.cs @@ -31,8 +31,10 @@ namespace Indy.IL2CPU.IL.X86 { xDataName = Assembler.GetIdentifier("StringLiteral"); Assembler.DataMembers.Add(new DataMember(xDataName, "dd", xDataName + "__Contents")); Assembler.DataMembers.Add(new DataMember(xDataName + "__Contents", "db", xDataVal)); + } else { + xDataName = xDataName.Substring(0, xDataName.Length - "__Contents".Length); } - Move(Assembler, "eax", xDataName); + Move(Assembler, "eax", "[" + xDataName + "]"); Pushd(4, "eax"); } else { var xDataByteArray = new StringBuilder();