diff --git a/source2/Build/Cosmos.Build.MSBuild/IL2CPUTask.cs b/source2/Build/Cosmos.Build.MSBuild/IL2CPUTask.cs index 6de830567..cbf73c5c9 100644 --- a/source2/Build/Cosmos.Build.MSBuild/IL2CPUTask.cs +++ b/source2/Build/Cosmos.Build.MSBuild/IL2CPUTask.cs @@ -169,7 +169,7 @@ namespace Cosmos.Build.MSBuild { xAsm.EmitELF = true; #endif - var xNasmAsm = (AssemblerNasm)xAsm.Assembler; + var xNasm = (CosmosAssembler)xAsm.Assembler; xAsm.Assembler.Initialize(); using (var xScanner = new ILScanner(xAsm)) { xScanner.TempDebug += x => LogMessage(x); @@ -181,7 +181,7 @@ namespace Cosmos.Build.MSBuild { using (var xOut = new StreamWriter(OutputFilename, false)) { //if (EmitDebugSymbols) { - xNasmAsm.FlushText(xOut); + xNasm.FlushText(xOut); xAsm.FinalizeDebugInfo(); } } diff --git a/source2/IL2CPU/Cosmos.IL2CPU.X86/AppAssembler.cs b/source2/IL2CPU/Cosmos.IL2CPU.X86/AppAssembler.cs index e33807066..301c1d858 100644 --- a/source2/IL2CPU/Cosmos.IL2CPU.X86/AppAssembler.cs +++ b/source2/IL2CPU/Cosmos.IL2CPU.X86/AppAssembler.cs @@ -16,7 +16,7 @@ namespace Cosmos.IL2CPU.X86 { protected AppAssembler(byte comportNumber) - : base(new AssemblerNasm(comportNumber)) { + : base(new CosmosAssembler(comportNumber)) { } protected override void Move(string aDestLabelName, int aValue) { diff --git a/source2/IL2CPU/Cosmos.IL2CPU.X86/AssemblerNasm.cs b/source2/IL2CPU/Cosmos.IL2CPU.X86/AssemblerNasm.cs deleted file mode 100644 index 3775d9bfb..000000000 --- a/source2/IL2CPU/Cosmos.IL2CPU.X86/AssemblerNasm.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using CPUx86 = Cosmos.Assembler.x86; -using System.Reflection; -using System.IO; -using Cosmos.Assembler; -using System.Diagnostics.SymbolStore; -using Microsoft.Samples.Debugging.CorSymbolStore; -using Cosmos.Debug.Common; -using Cosmos.Build.Common; - -namespace Cosmos.IL2CPU.X86 { - public class AssemblerNasm : CosmosAssembler - { - - public AssemblerNasm(byte aComNumber) : base(aComNumber) { } - - public override void FlushText(TextWriter aOutput) - { - aOutput.WriteLine("%ifndef ELF_COMPILATION"); - { - aOutput.WriteLine("use32"); - aOutput.WriteLine("org 0x200000"); - aOutput.WriteLine("[map all main.map]"); - } - aOutput.WriteLine("%endif"); - aOutput.WriteLine("global Kernel_Start"); - base.FlushText(aOutput); - } - - public bool EmitELF - { - get; - set; - } - - } -} \ No newline at end of file diff --git a/source2/IL2CPU/Cosmos.IL2CPU.X86/Cosmos.IL2CPU.X86.csproj b/source2/IL2CPU/Cosmos.IL2CPU.X86/Cosmos.IL2CPU.X86.csproj index d82e92746..b4b5df816 100644 --- a/source2/IL2CPU/Cosmos.IL2CPU.X86/Cosmos.IL2CPU.X86.csproj +++ b/source2/IL2CPU/Cosmos.IL2CPU.X86/Cosmos.IL2CPU.X86.csproj @@ -92,7 +92,6 @@ - diff --git a/source2/IL2CPU/Cosmos.IL2CPU.X86/CosmosAssembler.cs b/source2/IL2CPU/Cosmos.IL2CPU.X86/CosmosAssembler.cs index 2a0e6cfd2..682ce3fcb 100644 --- a/source2/IL2CPU/Cosmos.IL2CPU.X86/CosmosAssembler.cs +++ b/source2/IL2CPU/Cosmos.IL2CPU.X86/CosmosAssembler.cs @@ -354,6 +354,12 @@ namespace Cosmos.IL2CPU.X86 { public override void FlushText(TextWriter aOutput) { base.FlushText(aOutput); + aOutput.WriteLine("%ifndef ELF_COMPILATION"); + aOutput.WriteLine("use32"); + aOutput.WriteLine("org 0x200000"); + aOutput.WriteLine("[map all main.map]"); + aOutput.WriteLine("%endif"); + aOutput.WriteLine("global Kernel_Start"); } } }