cosmosos / xsharp Goto Github PK
View Code? Open in Web Editor NEWX# is a HLA (High Level Assembler) for X86/X64 (ARM coming) assembly language
Home Page: https://www.x-sharp.net/
License: BSD 3-Clause "New" or "Revised" License
X# is a HLA (High Level Assembler) for X86/X64 (ARM coming) assembly language
Home Page: https://www.x-sharp.net/
License: BSD 3-Clause "New" or "Revised" License
Hi,
even though it seems to be abandoned, your VS extension was helpful to me in understanding project-system extensions. Like many other VS extensions, it suffers from a recent VS update causing custom images not to be shown.
Please see here for details and upvote to get it fixed: https://developercommunity.visualstudio.com/t/VSSDKCPSExtensibility:-Image-Loading-i/10525678
Also, I posted a solution here: nanoframework/Home#1009 (comment)
Just in case, you still got plans for your project system.. :-)
sw
Repos: IL2CPU, XSharp and Common is installed.
Visual Studio 15.9+ is installed.
Visual Studio Workloads is installed.
Inno Setup is installed.
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe" "D:\alex-stuff\workspace-save programs\Visual studio workarea\source\Cosmos\Cosmos\Build.sln" /nologo /maxcpucount /nodeReuse:False /verbosity:minimal /t:"Restore" /p:DeployExtension=False
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets(265,5): error MSB3202: The project file "D:\alex-stuff\workspace-save programs\Visual studio workarea\source\Cosmos\XSharp\source\XSharp\XSharp.csproj" was not found. [D:\alex-stuff\workspace-save programs\Visual studio workarea\source\Cosmos\Cosmos\Build.sln]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets(265,5): error MSB3202: The project file "D:\alex-stuff\workspace-save programs\Visual studio workarea\source\Cosmos\XSharp\source\XSharp.Assembler\XSharp.Assembler.csproj" was not found. [D:\alex-stuff\workspace-save programs\Visual studio workarea\source\Cosmos\Cosmos\Build.sln]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets(265,5): error MSB3202: The project file "D:\alex-stuff\workspace-save programs\Visual studio workarea\source\Cosmos\XSharp\source\XSharp.x86\XSharp.x86.csproj" was not found. [D:\alex-stuff\workspace-save programs\Visual studio workarea\source\Cosmos\Cosmos\Build.sln]
System.Exception: The process failed to execute!
at Cosmos.Build.Builder.BuildTasks.ProcessBuildTaskBase.WaitForExit(Process process) in D:\alex-stuff\workspace-save programs\Visual studio workarea\source\Cosmos\Cosmos\source\Cosmos.Build.Builder\BuildTasks\ProcessBuildTaskBase.cs:line 67
at Cosmos.Build.Builder.BuildTasks.ProcessBuildTaskBase.<>c__DisplayClass5_0.b__2() in D:\alex-stuff\workspace-save programs\Visual studio workarea\source\Cosmos\Cosmos\source\Cosmos.Build.Builder\BuildTasks\ProcessBuildTaskBase.cs:line 48
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
at Cosmos.Build.Builder.ViewModels.MainWindowViewModel.d__27.MoveNext() in D:\alex-stuff\workspace-save programs\Visual studio workarea\source\Cosmos\Cosmos\source\Cosmos.Build.Builder\ViewModels\MainWindowViewModel.cs:line 128
Note (28/11/2017): VS support for LSP seems to be mainly focused on open folder scenarios, so we should wait for now.
We should implement the LSP (Language Server Protocol) for X#, which will work for many IDEs, including VS Code and VS (right now it's a preview extension).
Tools supporting the LSP: https://microsoft.github.io/language-server-protocol/implementors/tools/
There are currently 2 C# implementations of the protocol, and an official one is under development: https://microsoft.github.io/language-server-protocol/implementors/sdks/
I'm also interested in cross-platform compilation for linux and arm.
such as MPC56XX(automotive electronics Chip)
ARM:STM32
and so on .
I have read in the documentation that X# goals was to be bring some C like syntax to assembly, so to make assembly more intutive and easy, I assume. In the context of a C# OS, I would make X# bring some C#-like syntax to assembly rather than C because that would attract people from the managed world down to assembly more easily.
Therefore, I have some comments on the language syntax:
On arithmetic operations EAX +EBX means EAX = EAX + EBX, so why not use EAX +=EBX ? that would be much more intuitive for people coming from C# and going down to X#.
The same for -=, *=, /=, &=, |=, ^=
Equality comparison is using a single =, whereas C# is using a double ==. Again, would that be more logic to align on this one ?
string definition is done with single quotes. Again, for the sake of intuitiveness, why not double quotes ?
Constant definition in hexadecimal is using $. why not 0x ?
Constant reference is using #. What is the interest of that, rather than a syntax coloring in visual studio that indicates clearly the difference ?
Currently X# is coupled to x86. Below are some places where modifications could be made to make it easier to reuse portions of the code base when writing a high level assembler for other CPU architectures. As I find more I'll add them to this ticket.
In Parser.cs the static constructor sets up x86 registers. (In addition to the base registers being different we may have to accommodate hardware specific registers in the case of ARM.)
We'll probably need Qemu support in XSharp.Launch to do ARM emulation.
The XSharp project itself which contains the Parser, Token, TokenPatterns, etc depends on XSharp.x86 as well as XSharp.Assembler which has a whole x86 folder.
In the XSharp.SDK the AssemblerEnum only includes NASM but I believe we'd also need VASM or GNU Assembler to support ARM. The GenerateCommandLineCommands function in the same file would also need it's command line support extended to whatever additiona assembler is added.
References the class PropertyPage which doesn't exist.
From @furesoft on July 15, 2017 8:28
Copied from original issue: CosmosOS/Cosmos#699
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.