I want to build a 64bit Graphical CSharp OS, named Silicon OS(such as my name).
I want to know:
How can I compile C Sharp code to machine code?
How can CSharp to operate filesystem(FAT32, NTFS)?
I'm a Chinese.Your advice are most welcome!
Hey, how to compile CSharp to machine code?
-
- Member
- Posts: 5568
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Hey, how to compile CSharp to machine code?
Welcome! That's an ambitious project. I suggest reading this post for information that will help you.SiliconOS wrote:I want to build a 64bit Graphical CSharp OS, named Silicon OS(such as my name).
Take a look at the C# OS projects listed on the wiki. Those should give you some ideas for how to do it.SiliconOS wrote:How can I compile C Sharp code to machine code?
It works the same way with any language. (But there's no official NTFS documentation, so NTFS will be difficult.)SiliconOS wrote:How can CSharp to operate filesystem(FAT32, NTFS)?
Re: Hey, how to compile CSharp to machine code?
First, I need a tool to compile CS to native machine code.
Next, the OS need a bootloader, so I'm studying C and C++.
The C# library will be more difficult.
Next, the OS need a bootloader, so I'm studying C and C++.
The C# library will be more difficult.
Re: Hey, how to compile CSharp to machine code?
Which doesn't exists. There used to be one, but disappeared with tysos. Good luck with webarchive and latest C# versions...SiliconOS wrote:First, I need a tool to compile CS to native machine code.
Try BOOTBOOT, it will load your x86_64 kernel no matter what language it was compiled from (if you can compile native machine code from C#, that is).SiliconOS wrote:Next, the OS need a bootloader, so I'm studying C and C++.
But a must. Languages need run-time support libraries, that's how they work. Some languages require less, others more. In general you can say that the most "advanced" a language is, the bigger run-time it requires and harder to use it for bare-metal development (like RTTI in C++ for example). C is the preferred choice because you can use it without any run-time whatsoever (so called freestanding mode), and it compiles to native machine code directly (not an interpreted language like C# and Java).SiliconOS wrote:The C# library will be more difficult.
Cheers,
bzt
Re: Hey, how to compile CSharp to machine code?
Have you looked at FlingOS? They have a C# AOT compiler that turns C# IL to machine language.
-
- Member
- Posts: 5568
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Hey, how to compile CSharp to machine code?
Tysos moved to GitHub. The CIL compiler is also on GitHub.bzt wrote:Which doesn't exists. There used to be one, but disappeared with tysos.SiliconOS wrote:First, I need a tool to compile CS to native machine code.
Re: Hey, how to compile CSharp to machine code?
I'm in China and my OS is Windows
Re: Hey, how to compile CSharp to machine code?
Would you care to update our wiki with this info? Thanks a lot!Octocontrabass wrote:Tysos moved to GitHub. The CIL compiler is also on GitHub.bzt wrote:Which doesn't exists. There used to be one, but disappeared with tysos.SiliconOS wrote:First, I need a tool to compile CS to native machine code.
Cheers,
bzt