How to make it work?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Roman

How to make it work?

Post by Roman »

Hello!

I am a senior lead programmer and are now working on my own operating system on my sparetime. I will use C# to make the drivers work with plug & play. But how should I make the system calls using C#? Do I have to use unmanaged code YES? NO?

Cheers
Roman
Poseidon

Re:How to make it work?

Post by Poseidon »

not sure I get you right, but for doing a system call, i'd recommend programming the code in assemble code, and link it with the rest of your code.
AR

Re:How to make it work?

Post by AR »

Plug & Play is a "protocol", C# has no advantages with that, it is merely the ability for devices to identify themselves so an appropriate driver can be loaded without the user having to know what exactly is in the computer.

Yes, system calls must be machine code since .Net is an interpreted language it cannot contain interrupts or far calls.
beowulf573

Re:How to make it work?

Post by beowulf573 »

You're going to run into the same problem you have with writing an OS with Java. The layers of code with using C# look something like this:

Hardware -> OS -> CLR -> Managed Code

You could write a minimal OS that supports a CLR, which you also have to write. Just writing in C# won't give you plug and play support, you have to provide that at the OS level.

If all you are interested in is writing a desktop environment, you could use Linux and Mono to handle the low level and OS stuff and write a desktop in C# on top, but that's not really OS development, it's all in userland.

Eddie
Post Reply