From 1096560654ff0bca1cae79ab52ff70bb54fada45 Mon Sep 17 00:00:00 2001 From: mterwoord_cp <7cd3fd84a0151ea055c2f79e4d2eef9576fe9afesxUZAwxD> Date: Sun, 28 Oct 2007 14:11:50 +0000 Subject: [PATCH] kernel writeline works again --- source/Indy.IL2CPU.Assembler.X86.Native/Assembler.cs | 1 + .../CustomImplementations/System/ConsoleImpl.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/source/Indy.IL2CPU.Assembler.X86.Native/Assembler.cs b/source/Indy.IL2CPU.Assembler.X86.Native/Assembler.cs index 9b0b9f507..65cded44d 100644 --- a/source/Indy.IL2CPU.Assembler.X86.Native/Assembler.cs +++ b/source/Indy.IL2CPU.Assembler.X86.Native/Assembler.cs @@ -152,6 +152,7 @@ namespace Indy.IL2CPU.Assembler.X86.Native { mOutputWriter.WriteLine("; some more startups todo"); mOutputWriter.WriteLine(" call " + EngineEntryPointLabelName); mOutputWriter.WriteLine(" .loop:"); + mOutputWriter.WriteLine(" xchg bx, bx"); mOutputWriter.WriteLine(" hlt"); mOutputWriter.WriteLine(" jmp .loop"); mOutputWriter.WriteLine(" "); diff --git a/source/Indy.IL2CPU.IL.X86.Native/CustomImplementations/System/ConsoleImpl.cs b/source/Indy.IL2CPU.IL.X86.Native/CustomImplementations/System/ConsoleImpl.cs index a547d7d38..347d94831 100644 --- a/source/Indy.IL2CPU.IL.X86.Native/CustomImplementations/System/ConsoleImpl.cs +++ b/source/Indy.IL2CPU.IL.X86.Native/CustomImplementations/System/ConsoleImpl.cs @@ -27,7 +27,8 @@ namespace Indy.IL2CPU.IL.X86.Native.CustomImplementations.System { private unsafe static void PutChar(int aLine, int aPos, byte aChar) { int xScreenOffset = ((aPos + aLine * 80) * 2); byte* xScreenPtr = (byte*)((0xB8000) + xScreenOffset); - byte xVal = (byte)((aChar/* + 1*/) & 0xFF); + byte xVal = aChar; + global::System.Diagnostics.Debugger.Break(); *xScreenPtr = xVal; xScreenPtr += 1; *xScreenPtr = 7;