1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

programming an operating system

Discussion in 'Programming' started by studentintau, Aug 13, 2007.

  1. studentintau

    studentintau New Member

    Joined:
    Aug 4, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    Everyone knows that if you buy a computer you should install an operating system.
    20 years ago, it was DOS, today it is windows.
    My questions are :
    how the computer knows how to install them if it has no compiler yet (a computer knows only mashine language, zero and one)?
    is there a compiler in these programs?
    and if so, how do i do the same to my programs i have written in c language?
    how do i write a program in c language that would be on CD, and when i insert the CD into the computer without an operating system it will prints "hello world"?
    in what language did they write these operating system?
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,292
    Likes Received:
    365
    Trophy Points:
    83
    You should have something at the place where computer (BIOS) start i.e. at the address 0 to load the loader which will load the OS (Your program.)
     
  3. studentintau

    studentintau New Member

    Joined:
    Aug 4, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    you answered my question about operating system, but i did not understand it.
    please explain more.
    i know c language, and i have microsoft visual c++ if it helps.
     
  4. jwshepherd

    jwshepherd New Member

    Joined:
    Aug 13, 2007
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    VP Technology Corporation
    Location:
    Texas
    Home Page:
    The computer usually does not know or care what os you are running. All it knows is to test the bios and then following the bios test called POST it will check and see what device you have set to boot first and try that device.

    Each device capable of booting has information in the bootsector of the device which tells it where to get information for the MFT or Master File Table and read the first sector in the MFT.

    From there the software takes over and does what it is supposed to do (sometimes) and boots according to it's program..

    here is a great example of an open source operating system. http://www.freedos.org/
     

Share This Page