From 7e4856452921be34a1c0273ad28afdf64bb8bff4 Mon Sep 17 00:00:00 2001 From: kudzu_cp <6d05c8c8ef5431987001abfdb2eadc9593ac9498> Date: Wed, 17 Sep 2008 03:33:11 +0000 Subject: [PATCH] --- .../Indy.IL2CPU.Assembler.X86/SpecialDebug/DebugStub.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/Indy.IL2CPU.Assembler.X86/SpecialDebug/DebugStub.cs b/source/Indy.IL2CPU.Assembler.X86/SpecialDebug/DebugStub.cs index da05c6556..42af39e71 100644 --- a/source/Indy.IL2CPU.Assembler.X86/SpecialDebug/DebugStub.cs +++ b/source/Indy.IL2CPU.Assembler.X86/SpecialDebug/DebugStub.cs @@ -143,7 +143,11 @@ namespace Indy.IL2CPU.Assembler.X86 { Return(); } + // Input: ESI + // Output: None // Modifies: EAX, EDX + // + // Sends byte at [ESI] to com port and does esi + 1 protected void WriteByteToComPort() { // This sucks to use the stack, but x86 can only read and write ports from AL and // we need to read a port before we can write out the value to another port. @@ -154,8 +158,10 @@ namespace Indy.IL2CPU.Assembler.X86 { // the code and causes interaction with other code. DebugStub should be // as isolated as possible from any other code. Label = "WriteByteToComPort"; - Label = "WriteByteToComPort_Wait"; + // Sucks again to use DX just for this, but x86 only supports + // 8 bit address for literals on ports DX = mComStatusAddr; + Label = "WriteByteToComPort_Wait"; AL = Port[DX]; AL.Test(0x20); JumpIf(Flags.Zero, "WriteByteToComPort_Wait");