diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/Assembler.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/Assembler.cs index 9c23638d6..5a74c4e09 100644 --- a/source2/IL2PCU/Cosmos.IL2CPU.X86/Assembler.cs +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/Assembler.cs @@ -4,6 +4,6 @@ using System.Linq; using System.Text; namespace Cosmos.IL2CPU.X86 { - class Assembler { + public abstract class Assembler : Cosmos.IL2CPU.Assembler { } } diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerBin.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerBin.cs index 009ba72af..fed8f9ac2 100644 --- a/source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerBin.cs +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerBin.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; namespace Cosmos.IL2CPU.X86 { - public class AssemblerBin : Cosmos.IL2CPU.Assembler { + public class AssemblerBin : Assembler { protected override void InitILOps() { InitILOps(typeof(ILOp)); diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerNasm.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerNasm.cs index 17a2057b1..39cbb58c7 100644 --- a/source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerNasm.cs +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerNasm.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; namespace Cosmos.IL2CPU.X86 { - public class AssemblerNasm : Cosmos.IL2CPU.Assembler { + public class AssemblerNasm : Assembler { protected override void InitILOps() { InitILOps(typeof(ILOp)); diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/IL/Beq.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/IL/Beq.cs index 3776246b3..b8144bed2 100644 --- a/source2/IL2PCU/Cosmos.IL2CPU.X86/IL/Beq.cs +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/IL/Beq.cs @@ -34,9 +34,7 @@ namespace Cosmos.IL2CPU.X86.IL //new CPUx86.Jump(TargetLabel); //new CPU.Label(LabelFalse); //new CPUx86.Add(CPUx86.Registers_Old.ESP, "4"); - } - else - { + } else { new CPU.Pop { DestinationReg = CPU.Registers.EAX }; new CPU.Pop { DestinationReg = CPU.Registers.EBX }; new CPU.Pop { DestinationReg = CPU.Registers.ECX }; diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/ILOp.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/ILOp.cs index c74cd8f1d..8b87827e2 100644 --- a/source2/IL2PCU/Cosmos.IL2CPU.X86/ILOp.cs +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/ILOp.cs @@ -6,9 +6,11 @@ using CPU = Indy.IL2CPU.Assembler.X86; namespace Cosmos.IL2CPU.X86 { public abstract class ILOp : Cosmos.IL2CPU.ILOp { + protected new readonly Assembler Assembler; protected ILOp(Cosmos.IL2CPU.Assembler aAsmblr) : base(aAsmblr) { + Assembler = (Assembler)aAsmblr; OldAsmblr = ((CPU.Assembler)Indy.IL2CPU.Assembler.Assembler.CurrentInstance.Peek()); } diff --git a/source2/IL2PCU/Cosmos.IL2CPU/ILOp.cs b/source2/IL2PCU/Cosmos.IL2CPU/ILOp.cs index 349ccacc5..f7e6fd94b 100644 --- a/source2/IL2PCU/Cosmos.IL2CPU/ILOp.cs +++ b/source2/IL2PCU/Cosmos.IL2CPU/ILOp.cs @@ -5,7 +5,7 @@ using System.Text; namespace Cosmos.IL2CPU { public abstract class ILOp { - public readonly Assembler Assembler; + protected readonly Assembler Assembler; protected ILOp(Assembler aAsmblr) { Assembler = aAsmblr; }