View Single Post
Old Jan 4th, 2005, 3:48 PM   #11
Mjordan2nd
The Supreme Ruler
 
Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6 Mjordan2nd is on a distinguished road
Quote:
Originally posted by SubhadeepGhosh@Jan 4 2005, 09:35 AM
Hey,
I've got a small doubt about you loading and running a program without the use of an OS.
The frst thing is that, as far as I knew, when you compile or assemble a code under any OS...the OS places an OS specific header in your program (which is one of the reasons why you cannot run a code compiled in one OS, in another OS)...now if an OS specific header exists in your executable, then your code will not execute without the OS.
The second thing which I wanted to know was that, arn't you supposed to initialize the procesor and the memory before executing your code ?
Well, I don't know about any such header, but either way, it does work.

As for initializing the processor, I've never heard of anything like that. All that I've learned so far is that it reads the first sector from a device specified in your BIOS settings and loads the code from there into 0x7c00. You definitely can load a program without an OS, though.
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower
Mjordan2nd is offline   Reply With Quote