From 01b207d666ee3d4d1fe276f6d62fe2ff2af13f9a Mon Sep 17 00:00:00 2001 From: kudzu_cp <6d05c8c8ef5431987001abfdb2eadc9593ac9498> Date: Wed, 17 Sep 2008 03:09:27 +0000 Subject: [PATCH] Debugger.Send("Hello"); Now it works! --- .../SpecialDebug/DebugStub.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/Indy.IL2CPU.Assembler.X86/SpecialDebug/DebugStub.cs b/source/Indy.IL2CPU.Assembler.X86/SpecialDebug/DebugStub.cs index dd1023e94..b2386c2f1 100644 --- a/source/Indy.IL2CPU.Assembler.X86/SpecialDebug/DebugStub.cs +++ b/source/Indy.IL2CPU.Assembler.X86/SpecialDebug/DebugStub.cs @@ -106,21 +106,21 @@ namespace Indy.IL2CPU.Assembler.X86 { EAX.Push(); Call("WriteByteToComPort"); - //Need to find out which of these causes an error, watch output and trap errors // Address of string - //new X86.Move("EAX", "[EBP + 8]"); - // Dereference pointer - //new X86.Move("ESI", "[EAX]"); + new X86.Move("ESI", "[EBP + 8]"); Label = "DebugStub_SendTextWriteChar"; ECX.Compare(0); JumpIf(Flags.Equal, "DebugStub_SendTextExit"); - //new X86.Move("AL", "[ESI]"); - AL = 0xFF; + new X86.Move("AL", "[ESI]"); + //AL = 0xFF; EAX.Push(); //TODO: Change WriteByteToComPort to take an address to write to in a register Call("WriteByteToComPort"); new X86.Dec("ECX"); - //new X86.Inc("ESI"); + // We are storing as 16 bits, but for now I will transmit 8 bits + // So we inc twice to skip the 0 + new X86.Inc("ESI"); + new X86.Inc("ESI"); Jump("DebugStub_SendTextWriteChar"); Label = "DebugStub_SendTextExit";