c# & osdev & il resources

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
User avatar
raistlinthewiz
Member
Member
Posts: 34
Joined: Wed Jun 29, 2005 11:00 pm
Contact:

c# & osdev & il resources

Post by raistlinthewiz »

Hi again guys,
these days i'm thinking of redesigning my benchmark-os coremark (http://coremark.sf.net) from stratch.
What i'd like to do is instead of using usual c&asm , i'd like to implement the os with object-oriented design. But instead of using c++, i'd like to use c#.

I'm aware of the cosmos and sharpos projects and looked at them. Actually i can get grab a cosmos devkit and start building coremark on it again but instead i'd like to do things from stracth. So i started looking for documents about converting IL code assembly code. So if you guys out, know any articles useful for me i'll glad to see them. (Btw. i already know cosmos and sharpos projects)
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Re: c# & osdev & il resources

Post by jnc100 »

CIL

Writing a compiler

Good luck!

Regards,
John.
User avatar
kataklinger
Member
Member
Posts: 381
Joined: Fri Nov 04, 2005 12:00 am
Location: Serbia

Re: c# & osdev & il resources

Post by kataklinger »

grover
Posts: 17
Joined: Wed Apr 30, 2008 7:20 am

Re: c# & osdev & il resources

Post by grover »

Don't forget to visit these open source operating system projects: SharpOS, Ensemble and Cosmos.

They are working on a lot of these things.
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

Re: c# & osdev & il resources

Post by DeletedAccount »

Hi ,
Check out Inside IL Assembler from Microsoft Press , the book is great . The appendix section has the grammar of IL asm. Armed with this information -- you may able to write an IL to x86 converter . You may be able to use of il , but it may initially a require an asm library or some sort of frame work to easily convert il to x86 . I was trying to do this once , but got very lazy in the process . :( :( :( .

I also wrote a pathetic tutorial on il , posted in this forum . It is quite pathetic :)
Regards
Sandeep Mathew
grover
Posts: 17
Joined: Wed Apr 30, 2008 7:20 am

Re: c# & osdev & il resources

Post by grover »

The full IL is described in the CLI specifications published by ECMA in ISO/IEC 23271 (Second Edition from 2006 is current). They are complete except for a couple of opcodes, which were defined in the very first Beta 1 of .NET, but have been removed since and their use is reserved right now. These had to do with source code annotations to improve Jit performance.
User avatar
dc0d32
Member
Member
Posts: 69
Joined: Thu Jun 09, 2005 11:00 pm
Location: Right here

Re: c# & osdev & il resources

Post by dc0d32 »

I once tried writing a CIL to x86 compiler, and all I could make is a simple thing with simple tree tiling x86 emitter. Then when real problems of GC (safe points) and optimizations and things like static verification were at hand, I started feeling that it wasn't a one man project and even if I could've done it in reasonable amount of time, it just didn't feel like worth the hassle. I know what systems like singularity can offer, and it is really amazing. It just isn't a one man show. It surely isn't easy writing your own bartok.

So, if you can get some help wrt. tools/kits and get things going, by all means do that.

--
prashant
User avatar
cr2
Member
Member
Posts: 162
Joined: Fri Jun 27, 2008 8:05 pm
Location: ND, USA

Re: c# & osdev & il resources

Post by cr2 »

how about...

...the singularity RDK source code!! :D

http://www.codeplex.com/singularity
OS-LUX V0.0
Working on...
Memory management: the Pool
grover
Posts: 17
Joined: Wed Apr 30, 2008 7:20 am

Re: c# & osdev & il resources

Post by grover »

Please watch the Singularity license closely. It doesn't allow for anything than research. You also get tangled up by getting yourself involved with it - preventing you from working on a real open source managed operating system.
User avatar
kataklinger
Member
Member
Posts: 381
Joined: Fri Nov 04, 2005 12:00 am
Location: Serbia

Re: c# & osdev & il resources

Post by kataklinger »

grover wrote:It doesn't allow for anything than research.
I believe that it's enough.
grover wrote:You also get tangled up by getting yourself involved with it - preventing you from working on a real open source managed operating system.
I'm unable to find such clause in the license agreement.
grover
Posts: 17
Joined: Wed Apr 30, 2008 7:20 am

Re: c# & osdev & il resources

Post by grover »

The license is highly questionable, I'll highlight a couple for you:
SCOPE OF RIGHTS: You may use, copy, reproduce, and distribute this Software for any non-commercial academic purpose
So there you have it. That's all you can do with it.
Notwithstanding anything to the contrary herein, you may only use the tools included in the Software to build the Singularity system, or build applications that will run on Singularity.
You're understandably limited to use the Singularity RDK only for Singularity development.
4. That Microsoft is granted back, a non-exclusive, irrevocable, royalty-free, and sub-licensable license to, for any purpose, reproduce, publicly perform or display, install, use, modify, distribute, make and have made, sell and transfer modifications to and/or derivative works of the Software source code or data that you provide to Microsoft through the CodePlex tool or otherwise make directly available to Microsoft.
You do the work, they potentially get the money for it.
10. That the patent rights, if any, granted to you in this MSR-LA only apply to the Software, not to any derivative works you make.
Which means, you can use the software as is, but any modifications you make do not mean you have patent immunity from MS. So they could sue you for any changes you make.

The entangling however happens implicitly, as there's no right given to use the things you learn in other projects. In effect this is the same problem ReactOS had before they did the code review freeze and which touches all other projects, which are somehow related to commercially interested projects. In effect AFAIK no open source managed operating system group will allow you to contribute if they know you have had access to or worked with the singularity sources.
User avatar
cr2
Member
Member
Posts: 162
Joined: Fri Jun 27, 2008 8:05 pm
Location: ND, USA

Re: c# & osdev & il resources

Post by cr2 »

@grover, I only posted that link so that raistlinthewiz could study one way how a C#-based OS is implemented, not to use the tools included in it to make .netOS or whatever, or to create his/her own OS based on Singularity with some Singularity code in it. I believe there is no problem in this license agreement.
OS-LUX V0.0
Working on...
Memory management: the Pool
Post Reply