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
How to make it work?
Re:How to make it work?
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.
Re:How to make it work?
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.
Yes, system calls must be machine code since .Net is an interpreted language it cannot contain interrupts or far calls.
Re:How to make it work?
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
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