.NET C#

If you are new to OS Development, plan on spending some time here first before going into the other forums.

Moderator:Moderators

Post Reply
juFo
Posts:14
Joined:Sat Feb 02, 2008 1:41 pm
.NET C#

Post by juFo » Thu May 15, 2008 12:46 pm

Hello,

Is it possible to make a tutorial on how to load the .NET framework into your kernel.

It would make things easier if we could load the .NET framework and then develop in C#.

I know then you don't write your own OS but it would be cool to see how we can do it and what we can do with it.

see the Cosmos project with C#

Andyhhp
Moderator
Posts:387
Joined:Tue Oct 23, 2007 10:05 am
Location:127.0.0.1
Contact:

Post by Andyhhp » Thu May 15, 2008 3:24 pm

Hi,

It is possible but not easy.

.NET doesn't compile to machine instructions, it is compiled to bytecode which is then interpreted at runtime. From this point of view, you would need to write a full runtime environment in a different language before you could use any C# code.

Also, the reason that some people like .NET languages is because of the vast libraries that are easy to use. For an OS, you would have to write your own libraries, removing the vast majority of the functionality from the basic language.

Finally, C# and languages thereof were never designed to be low level languages and are missing key features such as inline assembly, direct addressing of specific memory etc. This is fatal to someone trying to write a kernel in C#.

It would be possible, given a fully working OS, to write a .NET runtime. However, we don't have anywhere near enough of a working operating system to implement such a thing at this time

Andrew
Image

Post Reply