none
Writing a Kernel in C# RRS feed

  • Question

  • Hi ,
    I  have a question . Instead of using ILDASM to emit il code , is there any way to directly  emit  il code by giving some option to csc compiler . I havent seen much useful options when i typed csc /? . I mean something like 
    gcc -S simple.c
    My idea is to convert the il code produced into x86 instructions so that it can be fed to nasm , masm or fasm .     Dissassembling the binary does not  appear to be very pretty. After  these  x86  instructions  are assembled into  object  code  , I can make use of a linker script to generate a  flat binary file . Then  this image can be booted using grub . This way I can create a simple prototype kernel that can serve as starting point for OS hackers all around the world who want to write
    their OS in C# . Almost any help would be welcome ..

    Regards
    Sandeep Mathew





    Saturday, April 12, 2008 2:26 AM

Answers

  •  

    Hi all,

    I think i have waited long !. I havent received any reply yet .  I would like to point out some resources of interest .

    1) Inside Microsoft IL Assembler from Microsoft Press :- The appendix has the grammar for ilasm -great

    2) Cosmos Project

    3) Sharpos Project

    4) Singularity from Microsoft .

    C# however is not the ideal language for writing an operating system . This is mainly because C# targets the .Net runtime.However once you have provided a runtime , we can make use of all the benifits offered by C# . The learning curve for writing operating systems in a managed langage in C# is unusually steep . The singulary project uses the Bartok compler , it however dosent target the runtime. I have written a few protected mode test kernels . I am planning to write tutorials for it. 

     

    The first reference is also a great reference if you want to write languages that target the .Net runtime . I am also trying to write a toy language that targets the runtime .

     

    Regards

    Sandeep Mathew

    Wednesday, June 18, 2008 12:21 PM
  • In case someone is interested , some random humbug i posted somewhere

    http://www.thehackerslibrary.com/?p=173

    Regards
    Sandeep Mathew
    Tuesday, September 16, 2008 4:12 PM

All replies

  •  

    Hi all,

    I think i have waited long !. I havent received any reply yet .  I would like to point out some resources of interest .

    1) Inside Microsoft IL Assembler from Microsoft Press :- The appendix has the grammar for ilasm -great

    2) Cosmos Project

    3) Sharpos Project

    4) Singularity from Microsoft .

    C# however is not the ideal language for writing an operating system . This is mainly because C# targets the .Net runtime.However once you have provided a runtime , we can make use of all the benifits offered by C# . The learning curve for writing operating systems in a managed langage in C# is unusually steep . The singulary project uses the Bartok compler , it however dosent target the runtime. I have written a few protected mode test kernels . I am planning to write tutorials for it. 

     

    The first reference is also a great reference if you want to write languages that target the .Net runtime . I am also trying to write a toy language that targets the runtime .

     

    Regards

    Sandeep Mathew

    Wednesday, June 18, 2008 12:21 PM
  • In case someone is interested , some random humbug i posted somewhere

    http://www.thehackerslibrary.com/?p=173

    Regards
    Sandeep Mathew
    Tuesday, September 16, 2008 4:12 PM
  • The reason you have not received any replies (other than from yourself) is because you marked your own responses as the answers. People generally overlook "answered" threads.

    Best regards,


    Nevin Janzen (Visit my Website)
    If this post answers your question, please click Propose As Answer. If this post is helpful, please click Vote As Helpful.
    How to Get Better Answers to Your Questions
    P.S. My replies are not critical, but humble responses. :)

    Friday, May 11, 2012 8:54 PM