none
Could I build my own Operating System if I use the Visual Studio tools for C and Assembler? RRS feed

  • Question

  • Hi!

     

    I'm learning C and Assembler, but I got a problem. I need a tool which could compile the C and Assembler codes and make them executabled, what I really want is that I don't want to use Dynamic Link Library (DLL) or *.dll in my OS. I want everything to be customized.

     

    <snip/> 

     

    Have a great day...

    Thursday, April 24, 2008 4:28 PM

All replies

  • Try an assembler or a compiler ???


    Thursday, April 24, 2008 7:39 PM
  • If you want to develop an operating system, the best place to start is the OSDev wiki. There is a lot of advice for what you need to do. Also, if you haven't built a compiler yet, I'd say that you should try that first and move to the OS later.

    Thursday, April 24, 2008 10:59 PM
  •  pkr2000 wrote:
    Try an assembler or a compiler ???


     

    Hi!

     

    Please tell where I could find the Code View (CV) software then it would help me...

     

    Thank you

     

     

    Saturday, April 26, 2008 8:16 AM
  • What are you asking for? An executable in what sense? You want something that runs on what platform, what are you asking for? Please follow the provided link if you want to author your own OS. If you want to write a new shell for Windows then you've got all the tools you need.

    Saturday, April 26, 2008 9:52 AM
  •  pkr2000 wrote:
    What are you asking for? An executable in what sense? You want something that runs on what platform, what are you asking for? Please follow the provided link if you want to author your own OS. If you want to write a new shell for Windows then you've got all the tools you need.

     

    Hi!

     

    What I'm saying is that I'm searching for a tool which could compile and build both 16-bit and 32-bit files but the

    files could just work on my own platform, I don't like to specify to much information.

     

    The OS must work on i386 computers and support the most of the current hardwares.

     

    What I want to do is to build files which doesn't have Dynamic Link Librarys (dll) as required files. But the components are build inside the *.exe file. And I need to comprimize the Executable(exe) files.

     

    I hope this information could make a clear image of what I want to do.

     

    Have a great day....   

    Saturday, April 26, 2008 2:50 PM
  • Visual Studio targets MS platforms and although it is only a shell of an IDE so you could target other platforms I think you'd be better off looking at YACC.

    Saturday, April 26, 2008 8:15 PM
  • If you're looking at building into a compiler, you might also want to look at pheonix, is it, to allow that learning to take place also?

     

    Martin.

     

    Monday, April 28, 2008 11:24 PM
  • Hi! - I'm not trying to build my own Compiler or debugger.

     

    What I'm talking about is that MICROSOFT WINDOWS, LINUX AND MAC ARE USING REFERENCES FROM THE CENTRAL PROCESS UNITS (cpu), WHAT I MEAN IS THAT WINDOWS, LINUX AND MAC CAME FROM A SYSTEM AND THEY ALL ARE USING THE SAME REFERNCES TO WORK ON THE i386 and i486 machines.

     

    Have a great day...but I don't think that somebody will solve this question..???

    Tuesday, April 29, 2008 4:33 PM
  • If you could construct a question it would help!

    Try the intel compilers and resources.

     

     

     

    Tuesday, April 29, 2008 4:53 PM
  •  pkr2000 wrote:

    If you could construct a question it would help!

    Try the intel compilers and resources.

     

    Hi! –pkr2000

    You want to know my question ok:

    I want to build my own Operating System (OS), but I don’t want to have Dynamic Link Library (DLL) or *.dll files in my own OS.

    I also want to build my own Platform which could separate the applications which are build for windows, what I mean here is that a Windows based application would not work on my OS and a MYCUSTOM OS based application would not work on Windows.

    Next, I want to build *.exe files with VS2003 or 2005.

    I know some tools like:

    cl.exe, ml.exe and link.exe but I don’t know if my system would require DLLS.

    So my question is can I build my own OS with Microsoft Visual Studio?

    And If I can, please specify how…

    I have tested the custom build rules but I didn’t know how to make it work…

     

    I need to build:

    Kernel, BOOT MENU, BOOT BLOCK, GUI and much more…

    Have a great day…  

     

    Tuesday, April 29, 2008 5:06 PM
  •  

    Hi Coder24.com,

     

    Here is what I can tell based on information you have provided...

     

    YES, you can use Visual Studio IDE to write 'a code', compile using 'a compiler' and bind libraries using 'a link' tool.

     

    There are Visual studio extensions which would let you do more than that...

     

    As Martin and Pkr originally suggested, the output of your compiler, in default as 'dll' or 'exe' is due to the fact it is using compiler that outputs files in .exe and .dll format.  Since you dont want dll in your OS, you first either need to find a compiler that would run on your OS or build a compiler...  It is almost chicken or egg thing except it is easier...

     

    You would first build your OS architecture, binary structures, etc.,  Then, you would use an assembler instrcution set built for specific chipset like i386+ that would create base runtime binaries in the way you want your OS to handle.  Then, using those foundational elements, you would build a compiler that makes it easier to create runtime from an ASCII text set - probably you already chose your language preference at this point to be a C++.

     

    Then you would change Visual Studio settings to use the compiler of your choice to build binaries the way you want.

     

    I am not 100% correct about all the steps above because it is almost 15 years I took my compiler and micro processor architecture class at college, but it is close...

     

    Looks like you are frustrated in the post.  But you are asking wrong audience here.  We are architets specialised in building business applications, solving business problems not systems architects.  I dont think any forum in msdn is a good post for building OS (Ofcourse MS wouldnt want to foster competition in their own post right...)

     

    Your best bet would be opensource especially in Linux forums where you can find people that can help you !!!

    Tuesday, April 29, 2008 8:28 PM
  • Not really an ambitious project at all!  Learning C and assembler, and want to build an operating system.

     

    My advice then would be to write drivers to, for example do IO, for say a communications port, all using your own code.  If you can get that working, then write another driver for disk access, and so on and so on.  Yes, you'd be looking at the output from your driver projects through an existing operating system, but if you can get those working then maybe once you have a way to display data, access it and so on, then you can tie the ends together to make the thing work properly?  Your difficulty is that you're going to have to have some harness to allow you to see what is happening and 'debug' your work, and if you don't want to use windows drivers, then you can't use windows, as you will not be able to run the software do to the hardware abstraction layer preventing it.

     

    You would need a good understanding of the low level, hardware specifications of the devices that you're wanting access to, that's why using an existing operating system is nice, because it abstracts all that away from you.

     

    When you say that you don't want a DLL in your OS, do you mean that you want to write the OS as a monolith project, or that you don't want to use any framework or operating system dlls in your OS?  I'm assuming the latter.  That's fine, you can do that, but it's not going to be an easy or quick process. 

     

    How much do you understand of the inner workings of a computer, from a hardware perspective?  I have a background in electronics, and about 12 years experience in the software industry, and I would find this sort of project quite a challenge.  I'm not saying don't do it, just that you might end up bald by the end of that project!

     

    Good luck,

     

    Martin Platt.

     

     

    Wednesday, April 30, 2008 3:14 AM
  • Coder,

    when you build an OS, that OS will have complete control of everything on top of it. But nothing, below itself, nothing but the hardware will support it

     

    That said, my question is... if you create .exe files for your kernel, boot menu and all that stuff, shall you later need DOS, Windows or any other OS underneath your "OS" in order to interpret your .exe outcomes? (if the answer is yes you won't be building an OS at last)

     

    I feel that the problem here is that Visual Studio is a Windows-oriented programming tool, which allows you to create applications targeting just Windows flavors (32-bits, 64-bits, etc)

     

    Probably when thinking on an OS as outcome you shouldn't care about the final format (wouldn't be neither .exe nor .dll anyway) but how to comply with the Intel architecture in order to be hooked during the booting process (I'm remembering here some lessons on Operating Systems I learned in 1990, almost 20 years ago, in my university... I thought I was never to talk about that anymore

    Tuesday, May 27, 2008 10:28 PM
  • Hi,

    Hi,

    The only operating system I've heard of built with .Net is COSMOS but it is built using VISUAL C# instead.

    See:>>

    http://www.gocosmos.org/index.en.aspx

     

    You could try converting the code to VB.Net if you wish.

    You could try using this tool:>>

    http://www.developerfusion.com/tools/convert/csharp-to-vb/

     

    I have posted the same reply here:>>

    http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/95b2be1f-1327-4594-90fb-f49fc0337d25



    Regards,

    John

    Click this link to see how to insert a picture into a forum post.

    Installing VB6 on Windows 7

    Monday, March 28, 2011 10:26 PM
  • Platform builder is a vs2005 plug in which is used to build Win CE.  In theory, each Win CE device kind of has it's own operating system.  All the code for the dll which makes up Win CE is available.

    But I don't think that'd satisfy Coder24's requirements he (OP) seems to want something like those things which will boot up from a USB flash drive.  Maybe finding out more about how they work would be the best step.

    I think though Martin's point is probably worth stressing again.

    As a C# dveloper who has dabbled in C++ and Win CE I can tell you  that just tweaking an operating system is quite a task.  Writing one from scratch is going to be an immense project unless your aims are very very limited. 

    Tuesday, March 29, 2011 7:08 AM
  • I have just noticed the date this question was posted. Nevertheless:

    First of all, writing an operating system is not the way to learn any language. Learn the languages, and then, when you are reasonably fluent in them, you can think about an OS.

    Secondly, if you are content with a 32 bit system, the Open Watcom compiler is a suitable compiler for OS development. They also have a MASM style assembler you would be able to use.

    Before you start work on your operating system, you will then have a lot of reading to do. You can learn some of the theory from undergraduate level text books, such as "Operating System Concepts", published by Wiley. However, you will also need to learn a lot of hardware specific stuff, which you won't find in those kinds of books. Instead it will have to be gleaned from the Intel Manuals (if the PC is going to be your target architecture), hardware data sheets for chips like the APIC, Real Time Clock and HPET, and you will need to glean information from websites such as osdev.org. However, the posters on that last site are not known for suffering fools gladly.


    • Edited by FarTooOld Wednesday, July 2, 2014 12:23 AM
    Wednesday, July 2, 2014 12:21 AM