10 Replies - 381 Views - Last Post: 02 July 2012 - 03:03 AM Rate Topic: -----

#1 persson121  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 43
  • Joined: 30-June 12

Can i build an operating system with C#?

Posted 01 July 2012 - 12:32 PM

Can i build an operative system with C#?
We say like Windows 95?
Just a basic one.

The kernel will be in c# and the bootloader will be in c#.
I know that c# is not like C or C++. It's more like python or Java. You need to have something to run with.

So is it possible? Take back Windows 95 agin :rockon:

Is This A Good Question/Topic? 0
  • +

Replies To: Can i build an operating system with C#?

#2 tlhIn`toq  Icon User is offline

  • Closing in on 5,000
  • member icon

Reputation: 4928
  • View blog
  • Posts: 10,465
  • Joined: 02-June 10

Re: Can i build an operating system with C#?

Posted 01 July 2012 - 12:34 PM

Not realistically. C# is built upon the .NET framework and its hooks into the WIndows operating system. Thus to use C# you have to first boot into Windows and have .NET installed.

You could build an application that runs within Windows that has the simplistic user interface you are looking for.

This post has been edited by tlhIn`toq: 01 July 2012 - 12:50 PM

Was This Post Helpful? 0
  • +
  • -

#3 Momerath  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 810
  • View blog
  • Posts: 1,952
  • Joined: 04-October 09

Re: Can i build an operating system with C#?

Posted 01 July 2012 - 12:38 PM

You can, Microsoft Research did it with Singularity. The loader had to be written in assembly, but after that it's all managed code.
Was This Post Helpful? 1
  • +
  • -

#4 tlhIn`toq  Icon User is offline

  • Closing in on 5,000
  • member icon

Reputation: 4928
  • View blog
  • Posts: 10,465
  • Joined: 02-June 10

Re: Can i build an operating system with C#?

Posted 01 July 2012 - 12:50 PM

So to be clear persson121 it can't be done per your specs of entirely in C#. When an entire Microsoft team did it, it required Assembly, C, Sing#, Spec#, C++

View Postpersson121, on 01 July 2012 - 01:32 PM, said:

and the bootloader will be in c#.


View PostMomerath, on 01 July 2012 - 01:38 PM, said:

The loader had to be written in assembly, but after that it's all managed code.


Wiki said:

The lowest-level x86 interrupt dispatch code is written in assembly language and C. Once this code has done its job, it invokes the kernel, whose runtime and garbage collector are written in Sing# (an extended version of Spec#, itself an extension of C#) and runs in unprotected mode. The hardware abstraction layer is written in C++ and runs in protected mode. There is also some C code to handle debugging. The computer's BIOS is invoked during the 16-bit real mode bootstrap stage; once in 32-bit mode, Singularity never invokes the BIOS again, but invokes device drivers written in Sing#. During installation, Common Intermediate Language (CIL) opcodes are compiled into x86 opcodes using the Bartok compiler.

Was This Post Helpful? 2
  • +
  • -

#5 persson121  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 43
  • Joined: 30-June 12

Re: Can i build an operating system with C#?

Posted 01 July 2012 - 12:54 PM

View PostMomerath, on 01 July 2012 - 12:38 PM, said:

You can, Microsoft Research did it with Singularity. The loader had to be written in assembly, but after that it's all managed code.


Ok. Thanks!
Well, i can use GNU's bootloader?
Image that that some create a copy of Windows 95 agin, who can use .net based programs and it's 100% free and opensouce. :donatello:

But the kernel can be in c#?

View PosttlhIn`toq, on 01 July 2012 - 12:50 PM, said:

So to be clear persson121 it can't be done per your specs of entirely in C#. When an entire Microsoft team did it, it required Assembly, C, Sing#, Spec#, C++

View Postpersson121, on 01 July 2012 - 01:32 PM, said:

and the bootloader will be in c#.


View PostMomerath, on 01 July 2012 - 01:38 PM, said:

The loader had to be written in assembly, but after that it's all managed code.


Wiki said:

The lowest-level x86 interrupt dispatch code is written in assembly language and C. Once this code has done its job, it invokes the kernel, whose runtime and garbage collector are written in Sing# (an extended version of Spec#, itself an extension of C#) and runs in unprotected mode. The hardware abstraction layer is written in C++ and runs in protected mode. There is also some C code to handle debugging. The computer's BIOS is invoked during the 16-bit real mode bootstrap stage; once in 32-bit mode, Singularity never invokes the BIOS again, but invokes device drivers written in Sing#. During installation, Common Intermediate Language (CIL) opcodes are compiled into x86 opcodes using the Bartok compiler.


Okej.
But GNU's bootloader and a kernel in C#? That would work?
Was This Post Helpful? 0
  • +
  • -

#6 tlhIn`toq  Icon User is offline

  • Closing in on 5,000
  • member icon

Reputation: 4928
  • View blog
  • Posts: 10,465
  • Joined: 02-June 10

Re: Can i build an operating system with C#?

Posted 01 July 2012 - 12:56 PM

Please let us know if it does after you give it a try.
Was This Post Helpful? 0
  • +
  • -

#7 persson121  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 43
  • Joined: 30-June 12

Re: Can i build an operating system with C#?

Posted 01 July 2012 - 01:04 PM

View PosttlhIn`toq, on 01 July 2012 - 12:56 PM, said:

Please let us know if it does after you give it a try.


So you're saying that building a kernel in C# won't work?
Was This Post Helpful? 0
  • +
  • -

#8 tlhIn`toq  Icon User is offline

  • Closing in on 5,000
  • member icon

Reputation: 4928
  • View blog
  • Posts: 10,465
  • Joined: 02-June 10

Re: Can i build an operating system with C#?

Posted 01 July 2012 - 01:18 PM

I'm saying (apparently too subtly to be picked up)... That it is a ridiculous project for so many reasons I scarcely know where to start. But was trying to nudge you into doing some of your own experimenting and research instead of asking everyone for a how-to tutorial.

The Microsoft team was just that: A big team of experts with unlimited resources for all practical purposes.

They picked a specific set of languages based on their combined 2,000 man-years of experience: But you want to do it differently.

You're trying to recreate an operating system that nobody wants or is likely to every use - and when you get done with it on your own, the year will be 2045. Kid, just pick up a garage sale PC for $5 and install Win95 on it if you love it that much.

If you want to work on it as a strictly educational experience, have at. You'll learn a lot about many languages and low-level hardware and driver creation. But honestly, I think there are about a million other projects that you could come up with that might have a practical application and might even make you a couple bucks. But its your 200,000 man-hours of time to spend doing whatever you want to with.
Was This Post Helpful? 0
  • +
  • -

#9 persson121  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 43
  • Joined: 30-June 12

Re: Can i build an operating system with C#?

Posted 01 July 2012 - 01:32 PM

I take that as a "No, you can't".
Im not a kid and i will never build a OS in C#.
I just wondering if it's possible :)
Was This Post Helpful? 0
  • +
  • -

#10 tlhIn`toq  Icon User is offline

  • Closing in on 5,000
  • member icon

Reputation: 4928
  • View blog
  • Posts: 10,465
  • Joined: 02-June 10

Re: Can i build an operating system with C#?

Posted 01 July 2012 - 08:42 PM

God damn it! Really? You're that bored that you had no intention of ever taking on this project but you thought you'd come up here a post a thread for it just to waste the time of the volunteers here to look things up for you and try to explain some concepts about it?

Sounds like a 'kid' move to me.

Thanks for wasting our time.
Was This Post Helpful? 0
  • +
  • -

#11 digitaldevelopment  Icon User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 168
  • Joined: 30-April 12

Re: Can i build an operating system with C#?

Posted 02 July 2012 - 03:03 AM

I think I'll give this idea a try, but in a few years, once I am getting used to C#, as now I am certainly not skilled enough for an enormeous task like this and I'd certainly don't do it alone
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1