Skip to content

Commit

Permalink
Cosmos.Assembler --> XSharp.Assembler
Browse files Browse the repository at this point in the history
  • Loading branch information
czhower committed Aug 11, 2017
1 parent 7327c31 commit 47aff26
Show file tree
Hide file tree
Showing 49 changed files with 138 additions and 141 deletions.
9 changes: 1 addition & 8 deletions Build.sln
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cosmos.Deploy.USB", "source
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cosmos.Deploy.Pixie", "source\Cosmos.Deploy.Pixie\Cosmos.Deploy.Pixie.csproj", "{D4BA64B3-D7F6-4A3A-AF1D-74E41B49D865}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XSharp.Nasm", "..\XSharp\source\XSharp.Nasm\XSharp.Nasm.csproj", "{841A734E-9606-4AAB-9C4A-74E7E303FF5D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XSharp.Compiler", "..\XSharp\source\XSharp.Compiler\XSharp.Compiler.csproj", "{69E08155-F075-4728-8387-1549CFD4FA97}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IL2CPU", "..\IL2CPU\source\IL2CPU\IL2CPU.csproj", "{F3025446-D2C7-4FEA-AB03-C707F7B48B43}"
Expand Down Expand Up @@ -86,7 +84,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.System2_Plugs", "sou
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Debug.Kernel.Plugs.Asm", "source\Cosmos.Debug.Kernel.Plugs.Asm\Cosmos.Debug.Kernel.Plugs.Asm.csproj", "{7549D7F8-58A3-4F4F-8544-DEF2ABF79A0B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Assembler", "..\XSharp\source\Cosmos.Assembler\Cosmos.Assembler.csproj", "{E1AC1E9B-27EA-4AE0-8C83-328BD96F978A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XSharp.Assembler", "..\XSharp\source\XSharp.Assembler\XSharp.Assembler.csproj", "{E1AC1E9B-27EA-4AE0-8C83-328BD96F978A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Build.Common", "source\Cosmos.Build.Common\Cosmos.Build.Common.csproj", "{CB20F8F9-8C1D-43A6-96EA-89FEC2512C99}"
EndProject
Expand Down Expand Up @@ -148,10 +146,6 @@ Global
{D4BA64B3-D7F6-4A3A-AF1D-74E41B49D865}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D4BA64B3-D7F6-4A3A-AF1D-74E41B49D865}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D4BA64B3-D7F6-4A3A-AF1D-74E41B49D865}.Release|Any CPU.Build.0 = Release|Any CPU
{841A734E-9606-4AAB-9C4A-74E7E303FF5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{841A734E-9606-4AAB-9C4A-74E7E303FF5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{841A734E-9606-4AAB-9C4A-74E7E303FF5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{841A734E-9606-4AAB-9C4A-74E7E303FF5D}.Release|Any CPU.Build.0 = Release|Any CPU
{69E08155-F075-4728-8387-1549CFD4FA97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{69E08155-F075-4728-8387-1549CFD4FA97}.Debug|Any CPU.Build.0 = Debug|Any CPU
{69E08155-F075-4728-8387-1549CFD4FA97}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -267,7 +261,6 @@ Global
{FB71E8EF-E229-4D81-984A-B9170D752BF9} = {9C8A3E55-9045-44CA-BFD4-16D5B4343A90}
{3D84CF8B-C6DF-4D78-8DE1-708582B43711} = {FD42844B-2767-4DF4-B0AF-EA5F7CB11528}
{D4BA64B3-D7F6-4A3A-AF1D-74E41B49D865} = {FD42844B-2767-4DF4-B0AF-EA5F7CB11528}
{841A734E-9606-4AAB-9C4A-74E7E303FF5D} = {9C8A3E55-9045-44CA-BFD4-16D5B4343A90}
{69E08155-F075-4728-8387-1549CFD4FA97} = {9C8A3E55-9045-44CA-BFD4-16D5B4343A90}
{F3025446-D2C7-4FEA-AB03-C707F7B48B43} = {6A15C540-8278-4B9C-B890-FA57FB6AE6A6}
{3C45A898-4AA9-476F-8302-63391D6ED044} = {6A15C540-8278-4B9C-B890-FA57FB6AE6A6}
Expand Down
2 changes: 1 addition & 1 deletion IDE.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Deploy", "Deploy", "{BDFC9B
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debug", "Debug", "{F7C6CA93-1D02-443C-9C8B-A1988DE0306B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Assembler", "..\XSharp\source\Cosmos.Assembler\Cosmos.Assembler.csproj", "{0CDB3F6E-7971-426B-81F8-38B966A54C2B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XSharp.Assembler", "..\XSharp\source\XSharp.Assembler\XSharp.Assembler.csproj", "{0CDB3F6E-7971-426B-81F8-38B966A54C2B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Build.Common", "source\Cosmos.Build.Common\Cosmos.Build.Common.csproj", "{F74A4B2B-02DA-455A-89FB-803A442B5B2C}"
EndProject
Expand Down
8 changes: 4 additions & 4 deletions IL2CPU.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Assembler", "Assembler", "{
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Compiler", "Compiler", "{C286932C-3F6D-47F0-BEEF-26843D1BB11B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Assembler", "..\XSharp\source\Cosmos.Assembler\Cosmos.Assembler.csproj", "{0CDB3F6E-7971-426B-81F8-38B966A54C2B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XSharp.Assembler", "..\XSharp\source\XSharp.Assembler\XSharp.Assembler.csproj", "{0CDB3F6E-7971-426B-81F8-38B966A54C2B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.IL2CPU", "source\Cosmos.IL2CPU\Cosmos.IL2CPU.csproj", "{4F903492-CCA6-4FD9-A1B6-5E4CC0CE7767}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.IL2CPU", "..\IL2CPU\source\Cosmos.IL2CPU\Cosmos.IL2CPU.csproj", "{4F903492-CCA6-4FD9-A1B6-5E4CC0CE7767}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.IL2CPU.API", "source\Cosmos.IL2CPU.API\Cosmos.IL2CPU.API.csproj", "{34AEEB7C-FD5D-4B15-A830-B429681844BD}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.IL2CPU.API", "..\IL2CPU\source\Cosmos.IL2CPU.API\Cosmos.IL2CPU.API.csproj", "{34AEEB7C-FD5D-4B15-A830-B429681844BD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "XSharp", "XSharp", "{E9CD521E-C386-466D-B5F7-A5EB19A61625}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XSharp.Common", "..\XSharp\source\XSharp.Common\XSharp.Common.csproj", "{72EB557A-8A2D-4B0F-823E-C70A791831B5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IL2CPU", "source\IL2CPU\IL2CPU.csproj", "{295AA95F-BEC6-4F9E-A2E1-8205FD06E951}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IL2CPU", "..\IL2CPU\source\IL2CPU\IL2CPU.csproj", "{295AA95F-BEC6-4F9E-A2E1-8205FD06E951}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XSharp.Compiler", "..\XSharp\source\XSharp.Compiler\XSharp.Compiler.csproj", "{6EE75318-F00B-4295-A132-484CDB812801}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion Kernel.sln
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "40 System", "40 System", "{
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "50 Application", "50 Application", "{2A22DC4C-E237-4D4B-A592-47D477F9ED5B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Assembler", "..\XSharp\source\Cosmos.Assembler\Cosmos.Assembler.csproj", "{F0860B7D-3FF7-4E2A-AC10-18E87ADD62A3}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XSharp.Assembler", "..\XSharp\source\XSharp.Assembler\XSharp.Assembler.csproj", "{F0860B7D-3FF7-4E2A-AC10-18E87ADD62A3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XSharp.Common", "..\XSharp\source\XSharp.Common\XSharp.Common.csproj", "{F785B091-7E4D-4D2E-A310-B18690623F74}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion Test.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Kernel G2", "Kernel G2", "{
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{1A46752C-98F3-4DE3-B1FB-EDCE22E8AF73}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Assembler", "source\Cosmos.Assembler\Cosmos.Assembler.csproj", "{0CDB3F6E-7971-426B-81F8-38B966A54C2B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XSharp.Assembler", "source\XSharp.Assembler\XSharp.Assembler.csproj", "{0CDB3F6E-7971-426B-81F8-38B966A54C2B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.Build.Common", "source\Cosmos.Build.Common\Cosmos.Build.Common.csproj", "{F74A4B2B-02DA-455A-89FB-803A442B5B2C}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion Tests/Cosmos.TestRunner.Core/Cosmos.TestRunner.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\source\Cosmos.Assembler\Cosmos.Assembler.csproj" />
<ProjectReference Include="..\..\source\XSharp.Assembler\XSharp.Assembler.csproj" />
<ProjectReference Include="..\..\source\Cosmos.Build.Common\Cosmos.Build.Common.csproj" />
<ProjectReference Include="..\..\source\Cosmos.Core_Asm\Cosmos.Core_Asm.csproj" />
<ProjectReference Include="..\..\source\Cosmos.Debug.DebugConnectors\Cosmos.Debug.DebugConnectors.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<ProjectGuid>{6658FCE0-7032-4B7B-BD95-F2765C393442}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Cosmos.Assembler.X86.Gero</RootNamespace>
<AssemblyName>Cosmos.Assembler.X86.Gero</AssemblyName>
<RootNamespace>XSharp.Assembler.X86.Gero</RootNamespace>
<AssemblyName>XSharp.Assembler.X86.Gero</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<ProjectGuid>{D5321EC7-9F27-4713-A7EC-9BED3ACA8D9F}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Cosmos.Assembler.Nasm</RootNamespace>
<AssemblyName>Cosmos.Assembler.Nasm</AssemblyName>
<RootNamespace>XSharp.Assembler.Nasm</RootNamespace>
<AssemblyName>XSharp.Assembler.Nasm</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
Expand Down
4 changes: 2 additions & 2 deletions source/Archive/Cosmos.Kernel.Plugs/Cosmos.Kernel.Plugs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@
<Compile Include="ThreadImpl.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\XSharp\source\Cosmos.Assembler\Cosmos.Assembler.csproj">
<ProjectReference Include="..\..\..\..\XSharp\source\XSharp.Assembler\XSharp.Assembler.csproj">
<Project>{1116130E-28E0-428A-A597-F4B3B676C0CA}</Project>
<Name>Cosmos.Assembler</Name>
<Name>XSharp.Assembler</Name>
</ProjectReference>
<ProjectReference Include="..\..\Cosmos.IL2CPU.Plugs\Cosmos.IL2CPU.Plugs.csproj">
<Project>{C801F19C-A9D3-42D5-9A57-9FFDF9B4D05E}</Project>
Expand Down
4 changes: 2 additions & 2 deletions source/Archive/Cosmos.Sys.Plugs/Cosmos.Sys.Plugs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@
<Compile Include="VFS\PathImpl.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\XSharp\source\Cosmos.Assembler\Cosmos.Assembler.csproj">
<ProjectReference Include="..\..\..\XSharp\source\XSharp.Assembler\XSharp.Assembler.csproj">
<Project>{1116130E-28E0-428A-A597-F4B3B676C0CA}</Project>
<Name>Cosmos.Assembler</Name>
<Name>XSharp.Assembler</Name>
</ProjectReference>
<ProjectReference Include="..\..\Cosmos.IL2CPU.Plugs\Cosmos.IL2CPU.Plugs.csproj">
<Project>{C801F19C-A9D3-42D5-9A57-9FFDF9B4D05E}</Project>
Expand Down
4 changes: 2 additions & 2 deletions source/Cosmos.Core_Asm/Array/ArrayGetLengthAsm.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Cosmos.Assembler;
using XSharp.Assembler;
using XSharp.Common;

namespace Cosmos.Core_Asm
{
public class ArrayGetLengthAsm : AssemblerMethod
{
public override void AssembleNew(Assembler.Assembler aAssembler, object aMethodInfo)
public override void AssembleNew(Assembler aAssembler, object aMethodInfo)
{
// $this ebp+8
XS.Set(XSRegisters.EAX, XSRegisters.EBP, sourceDisplacement: 8);
Expand Down
6 changes: 3 additions & 3 deletions source/Cosmos.Core_Asm/Array/ArrayInternalCopyAsm.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Cosmos.Assembler;
using XSharp.Assembler;
using Cosmos.IL2CPU.API;
using XSharp.Common;
using CPUx86 = Cosmos.Assembler.x86;
using CPUx86 = XSharp.Assembler.x86;

namespace Cosmos.Core_Asm
{
Expand All @@ -22,7 +22,7 @@ public class ArrayInternalCopyAsm : AssemblerMethod
* bool reliable); ebp + 8
*/

public override void AssembleNew(Assembler.Assembler aAssembler, object aMethodInfo)
public override void AssembleNew(Assembler aAssembler, object aMethodInfo)
{
XS.Comment("Source");
XS.Comment("Element size");
Expand Down
6 changes: 3 additions & 3 deletions source/Cosmos.Core_Asm/Buffer/BufferBlockCopyAsm.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Cosmos.Assembler;
using XSharp.Assembler;
using Cosmos.IL2CPU.API;
using XSharp.Common;
using CPUx86 = Cosmos.Assembler.x86;
using CPUx86 = XSharp.Assembler.x86;

namespace Cosmos.Core_Asm
{
Expand All @@ -20,7 +20,7 @@ public class BufferBlockCopyAsm : AssemblerMethod
* int dstOffset, [ebp + 12]
* int count); [ebp + 8]
*/
public override void AssembleNew(Assembler.Assembler aAssembler, object aMethodInfo)
public override void AssembleNew(Assembler aAssembler, object aMethodInfo)
{
XS.Comment("Source array");
XS.Set(XSRegisters.ESI, XSRegisters.EBP, sourceDisplacement: SourceArrayDisplacement);
Expand Down
4 changes: 2 additions & 2 deletions source/Cosmos.Core_Asm/CPU/CPUDisableINTsAsm.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Cosmos.Assembler;
using XSharp.Assembler;
using XSharp.Common;

namespace Cosmos.Core_Asm
{
public class CPUDisableINTsAsm : AssemblerMethod
{
public override void AssembleNew(Cosmos.Assembler.Assembler aAssembler, object aMethodInfo)
public override void AssembleNew(Assembler aAssembler, object aMethodInfo)
{
XS.ClearInterruptFlag();
}
Expand Down
4 changes: 2 additions & 2 deletions source/Cosmos.Core_Asm/CPU/CPUEnableINTsAsm.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Cosmos.Assembler;
using XSharp.Assembler;
using XSharp.Common;

namespace Cosmos.Core_Asm
{
public class CPUEnableINTsAsm : AssemblerMethod
{
public override void AssembleNew(Cosmos.Assembler.Assembler aAssembler, object aMethodInfo)
public override void AssembleNew(Assembler aAssembler, object aMethodInfo)
{
XS.EnableInterrupts();
}
Expand Down
4 changes: 2 additions & 2 deletions source/Cosmos.Core_Asm/CPU/CPUGetAmountOfRAMAsm.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Cosmos.Assembler;
using XSharp.Assembler;
using XSharp.Common;

namespace Cosmos.Core_Asm
{
public class CPUGetAmountOfRAMAsm : AssemblerMethod
{
public override void AssembleNew(Cosmos.Assembler.Assembler aAssembler, object aMethodInfo)
public override void AssembleNew(Assembler aAssembler, object aMethodInfo)
{
XS.Set(XSRegisters.EAX, "MultiBootInfo_Memory_High", sourceIsIndirect: true);
XS.Xor(XSRegisters.EDX, XSRegisters.EDX);
Expand Down
4 changes: 2 additions & 2 deletions source/Cosmos.Core_Asm/CPU/CPUGetEndOfKernelAsm.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Cosmos.Assembler;
using XSharp.Assembler;
using XSharp.Common;

namespace Cosmos.Core_Asm
{
public class CPUGetEndOfKernelAsm : AssemblerMethod
{
public override void AssembleNew(Assembler.Assembler aAssembler, object aMethodInfo)
public override void AssembleNew(Assembler aAssembler, object aMethodInfo)
{
XS.Push("_end_code");
}
Expand Down
4 changes: 2 additions & 2 deletions source/Cosmos.Core_Asm/CPU/CPUHaltAsm.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Cosmos.Assembler;
using XSharp.Assembler;
using XSharp.Common;

namespace Cosmos.Core_Asm
{
public class CPUHaltAsm : AssemblerMethod
{
public override void AssembleNew(Cosmos.Assembler.Assembler aAssembler, object aMethodInfo)
public override void AssembleNew(Assembler aAssembler, object aMethodInfo)
{
XS.Halt();
}
Expand Down
4 changes: 2 additions & 2 deletions source/Cosmos.Core_Asm/CPU/CPUInitFloatAsm.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Cosmos.Assembler;
using XSharp.Assembler;
using XSharp.Common;

namespace Cosmos.Core_Asm
{
public class CPUInitFloatAsm : AssemblerMethod
{
public override void AssembleNew(Cosmos.Assembler.Assembler aAssembler, object aMethodInfo)
public override void AssembleNew(Assembler aAssembler, object aMethodInfo)
{
XS.FPU.FloatInit();
}
Expand Down
4 changes: 2 additions & 2 deletions source/Cosmos.Core_Asm/CPU/CPUInitSSEAsm.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Cosmos.Assembler;
using XSharp.Assembler;
using XSharp.Common;

namespace Cosmos.Core_Asm
{
public class CPUInitSSEAsm : AssemblerMethod
{
public override void AssembleNew(Cosmos.Assembler.Assembler aAssembler, object aMethodInfo)
public override void AssembleNew(Assembler aAssembler, object aMethodInfo)
{
XS.SSE.SSEInit();
}
Expand Down
6 changes: 3 additions & 3 deletions source/Cosmos.Core_Asm/CPU/CPUUpdateIDTAsm.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System;
using System.Reflection;

using Cosmos.Assembler;
using Cosmos.Assembler.x86;
using XSharp.Assembler;
using XSharp.Assembler.x86;
using Cosmos.IL2CPU.API.Attribs;
using XSharp.Common;
using static XSharp.Common.XSRegisters;
Expand Down Expand Up @@ -36,7 +36,7 @@ private static MethodBase GetInterruptHandler(byte aInterrupt)
, "HandleInterrupt_" + aInterrupt.ToString("X2"), false);
}

public override void AssembleNew(Assembler.Assembler aAssembler, object aMethodInfo)
public override void AssembleNew(Assembler aAssembler, object aMethodInfo)
{
// IDT is already initialized but just for base hooks, and asm only.
// ie Int 1, 3 and GPF
Expand Down
11 changes: 6 additions & 5 deletions source/Cosmos.Core_Asm/CPU/CPUZeroFillAsm.cs
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
using Cosmos.Assembler;
using XSharp.Assembler;
using XSharp.Common;
using x86 = XSharp.Assembler.x86;

namespace Cosmos.Core_Asm
{
public class CPUZeroFillAsm : AssemblerMethod
{
public override void AssembleNew(Assembler.Assembler aAssembler, object aMethodInfo)
public override void AssembleNew(Assembler aAssembler, object aMethodInfo)
{
XS.ClearDirectionFlag();
XS.Set(XSRegisters.EDI, XSRegisters.EBP, sourceDisplacement: 0xC); //address
XS.Set(XSRegisters.ECX, XSRegisters.EBP, sourceDisplacement: 0x8); //length
// set EAX to value of fill (zero)
XS.Xor(XSRegisters.EAX, XSRegisters.EAX);
XS.ShiftRight(XSRegisters.ECX, 1);
XS.Jump(Assembler.x86.ConditionalTestEnum.NotBelow, ".step2");
XS.Jump(x86.ConditionalTestEnum.NotBelow, ".step2");
XS.StoreByteInString();
XS.Label(".step2");
XS.ShiftRight(XSRegisters.ECX, 1);
XS.Jump(Assembler.x86.ConditionalTestEnum.NotBelow, ".step3");
XS.Jump(x86.ConditionalTestEnum.NotBelow, ".step3");
XS.StoreWordInString();
XS.Label(".step3");
new Assembler.x86.Stos { Size = 32, Prefixes = Assembler.x86.InstructionPrefixes.Repeat };
new x86.Stos { Size = 32, Prefixes = x86.InstructionPrefixes.Repeat };
}
}
}
2 changes: 1 addition & 1 deletion source/Cosmos.Core_Asm/Cosmos.Core_Asm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<ItemGroup>
<ProjectReference Include="..\..\..\IL2CPU\source\Cosmos.IL2CPU.API\Cosmos.IL2CPU.API.csproj" />
<ProjectReference Include="..\..\..\IL2CPU\source\Cosmos.IL2CPU\Cosmos.IL2CPU.csproj" />
<ProjectReference Include="..\..\..\XSharp\source\Cosmos.Assembler\Cosmos.Assembler.csproj" />
<ProjectReference Include="..\..\..\XSharp\source\XSharp.Assembler\XSharp.Assembler.csproj" />
<ProjectReference Include="..\Cosmos.Core\Cosmos.Core.csproj" />
<ProjectReference Include="..\Cosmos.Debug.Kernel\Cosmos.Debug.Kernel.csproj" />
<ProjectReference Include="..\..\..\XSharp\source\XSharp.Common\XSharp.Common.csproj" />
Expand Down
4 changes: 2 additions & 2 deletions source/Cosmos.Core_Asm/Delegate/DelegateCtorAsm.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Reflection;
using Cosmos.Assembler;
using XSharp.Assembler;
using Cosmos.IL2CPU;
using Cosmos.IL2CPU.X86.IL;
using XSharp.Common;
Expand All @@ -8,7 +8,7 @@ namespace Cosmos.Core_Asm
{
public class DelegateCtorAsm : AssemblerMethod
{
public override void AssembleNew(Cosmos.Assembler.Assembler aAssembler, object aMethodInfo)
public override void AssembleNew(Assembler aAssembler, object aMethodInfo)
{
// method signature: $this, object @object, IntPtr method
var xAssembler = aAssembler;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using System.Reflection;
using Cosmos.Assembler;
using XSharp.Assembler;
using Cosmos.IL2CPU;
using XSharp.Common;

namespace Cosmos.Core_Asm
{
public class DelegateGetMulticastInvokeAsm : AssemblerMethod
{
public override void AssembleNew(Cosmos.Assembler.Assembler aAssembler, object aMethodInfo)
public override void AssembleNew(Assembler aAssembler, object aMethodInfo)
{
var xAssembler = aAssembler;
var xMethodInfo = (MethodInfo)aMethodInfo;
Expand Down
Loading

0 comments on commit 47aff26

Please sign in to comment.