diff --git a/XSharp/source/XSharp.Nasm/Assembler.cs b/XSharp/source/XSharp.Nasm/Assembler.cs new file mode 100644 index 000000000..03d28cf08 --- /dev/null +++ b/XSharp/source/XSharp.Nasm/Assembler.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace XSharp.Nasm { + public class Assembler { + public List Data = new List(); + public List Code = new List(); + + public static Assembler operator +(Assembler aThis, string aThat) { + aThis.Code.Add(aThat); + return aThis; + } + + public void Mov(string aDst, string aSrc) { + Mov("", aDst, aSrc); + } + public void Mov(string aSize, string aDst, string aSrc) { + string xSize = ""; + if (aSize != "") { + xSize = aSize + " "; + } + Code.Add("Mov " + xSize + aDst + ", " + aSrc); + } + } +} diff --git a/XSharp/source/XSharp.Nasm/Cosmos.snk b/XSharp/source/XSharp.Nasm/Cosmos.snk new file mode 100644 index 000000000..68808d392 Binary files /dev/null and b/XSharp/source/XSharp.Nasm/Cosmos.snk differ diff --git a/XSharp/source/XSharp.Nasm/Properties/AssemblyInfo.cs b/XSharp/source/XSharp.Nasm/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..231daf7dc --- /dev/null +++ b/XSharp/source/XSharp.Nasm/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("XSharp.Nasm")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("XSharp.Nasm")] +[assembly: AssemblyCopyright("Copyright © 2012")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c69b49a7-d175-49db-8ebb-0f3e34aca2f7")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/XSharp/source/XSharp.Nasm/XSharp.Nasm.csproj b/XSharp/source/XSharp.Nasm/XSharp.Nasm.csproj new file mode 100644 index 000000000..e36ad6f86 --- /dev/null +++ b/XSharp/source/XSharp.Nasm/XSharp.Nasm.csproj @@ -0,0 +1,67 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {841A734E-9606-4AAB-9C4A-74E7E303FF5D} + Library + Properties + XSharp.Nasm + XSharp.Nasm + v4.0 + 512 + SAK + SAK + SAK + SAK + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + true + + + Cosmos.snk + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/XSharp/source/XSharp.Nasm/XSharp.Nasm.csproj.vspscc b/XSharp/source/XSharp.Nasm/XSharp.Nasm.csproj.vspscc new file mode 100644 index 000000000..feffdecaa --- /dev/null +++ b/XSharp/source/XSharp.Nasm/XSharp.Nasm.csproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" +} diff --git a/XSharp/source/XSharp.sln b/XSharp/source/XSharp.sln new file mode 100644 index 000000000..01f0103a1 --- /dev/null +++ b/XSharp/source/XSharp.sln @@ -0,0 +1,77 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cosmos.VS.XSharp", "..\..\source2\VSIP\Cosmos.VS.XSharp\Cosmos.VS.XSharp.csproj", "{FB71E8EF-E229-4D81-984A-B9170D752BF9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cosmos.Compiler.XSharp", "..\..\source2\Compiler\Cosmos.XSharp\Cosmos.Compiler.XSharp.csproj", "{A281A1B1-C718-4BCB-A7BE-ED840A70449A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XSharp.Test", "XSharp.Test\XSharp.Test.csproj", "{2A59517C-356E-4B55-B155-50335BF482FB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XSharp.XSC", "XSharp.XSC\XSharp.XSC.csproj", "{7B8499A7-0A8D-44FC-8181-9666CC198025}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XSharp.Nasm", "XSharp.Nasm\XSharp.Nasm.csproj", "{841A734E-9606-4AAB-9C4A-74E7E303FF5D}" +EndProject +Global + GlobalSection(TeamFoundationVersionControl) = preSolution + SccNumberOfProjects = 6 + SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} + SccTeamFoundationServer = https://tfs.codeplex.com/tfs/tfs04 + SccProjectUniqueName0 = ..\\..\\source2\\VSIP\\Cosmos.VS.XSharp\\Cosmos.VS.XSharp.csproj + SccProjectName0 = ../../source2/VSIP/Cosmos.VS.XSharp + SccLocalPath0 = ..\\..\\source2\\VSIP\\Cosmos.VS.XSharp + SccProjectUniqueName1 = ..\\..\\source2\\Compiler\\Cosmos.XSharp\\Cosmos.Compiler.XSharp.csproj + SccProjectName1 = ../../source2/Compiler/Cosmos.XSharp + SccLocalPath1 = ..\\..\\source2\\Compiler\\Cosmos.XSharp + SccProjectUniqueName2 = XSharp.Test\\XSharp.Test.csproj + SccProjectName2 = XSharp.Test + SccLocalPath2 = XSharp.Test + SccProjectUniqueName3 = XSharp.XSC\\XSharp.XSC.csproj + SccProjectName3 = XSharp.XSC + SccLocalPath3 = XSharp.XSC + SccLocalPath4 = . + SccProjectUniqueName5 = XSharp.Nasm\\XSharp.Nasm.csproj + SccProjectName5 = XSharp.Nasm + SccLocalPath5 = XSharp.Nasm + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FB71E8EF-E229-4D81-984A-B9170D752BF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FB71E8EF-E229-4D81-984A-B9170D752BF9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FB71E8EF-E229-4D81-984A-B9170D752BF9}.Debug|x86.ActiveCfg = Debug|Any CPU + {FB71E8EF-E229-4D81-984A-B9170D752BF9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FB71E8EF-E229-4D81-984A-B9170D752BF9}.Release|Any CPU.Build.0 = Release|Any CPU + {FB71E8EF-E229-4D81-984A-B9170D752BF9}.Release|x86.ActiveCfg = Release|Any CPU + {A281A1B1-C718-4BCB-A7BE-ED840A70449A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A281A1B1-C718-4BCB-A7BE-ED840A70449A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A281A1B1-C718-4BCB-A7BE-ED840A70449A}.Debug|x86.ActiveCfg = Debug|Any CPU + {A281A1B1-C718-4BCB-A7BE-ED840A70449A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A281A1B1-C718-4BCB-A7BE-ED840A70449A}.Release|Any CPU.Build.0 = Release|Any CPU + {A281A1B1-C718-4BCB-A7BE-ED840A70449A}.Release|x86.ActiveCfg = Release|Any CPU + {2A59517C-356E-4B55-B155-50335BF482FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A59517C-356E-4B55-B155-50335BF482FB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A59517C-356E-4B55-B155-50335BF482FB}.Debug|x86.ActiveCfg = Debug|Any CPU + {2A59517C-356E-4B55-B155-50335BF482FB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A59517C-356E-4B55-B155-50335BF482FB}.Release|Any CPU.Build.0 = Release|Any CPU + {2A59517C-356E-4B55-B155-50335BF482FB}.Release|x86.ActiveCfg = Release|Any CPU + {7B8499A7-0A8D-44FC-8181-9666CC198025}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7B8499A7-0A8D-44FC-8181-9666CC198025}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7B8499A7-0A8D-44FC-8181-9666CC198025}.Debug|x86.ActiveCfg = Debug|Any CPU + {7B8499A7-0A8D-44FC-8181-9666CC198025}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7B8499A7-0A8D-44FC-8181-9666CC198025}.Release|Any CPU.Build.0 = Release|Any CPU + {7B8499A7-0A8D-44FC-8181-9666CC198025}.Release|x86.ActiveCfg = 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}.Debug|x86.ActiveCfg = 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 + {841A734E-9606-4AAB-9C4A-74E7E303FF5D}.Release|x86.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/XSharp/source/XSharp.vssscc b/XSharp/source/XSharp.vssscc new file mode 100644 index 000000000..794f014c9 --- /dev/null +++ b/XSharp/source/XSharp.vssscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" +}