Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Programming (http://www.go4expert.com/forums/programming-forum/)
-   -   programming an operating system (http://www.go4expert.com/forums/programming-operating-t5835/)

studentintau 13Aug2007 17:12

programming an operating system
 
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?

shabbir 13Aug2007 17:39

Re: programming an operating system
 
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.)

studentintau 14Aug2007 22:35

Re: programming an operating system
 
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.

jwshepherd 15Aug2007 02:14

Re: programming an operating system
 
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/


All times are GMT +5.5. The time now is 19:13.