how would someone have built the first operating system without somethign previous? Was it done just in machine code? If so, how would they have programmed in machine code to accomplish this, exactly?
how would someone have built the first operating system without somethign previous? Was it done just in machine code? If so, how would they have programmed in machine code to accomplish this, exactly?
Clear the mines from our Shazbot!
Get the enemy Shazbot!
That's a pretty vague question you got there.
Take DOS for example:- it's probably the simplest OS you can get. A bunch of handlers was written for software interrupt 21h to perform various tasks (such as file I/O, simple process management, etc.) and the kernel is effectively nonexistant (well, you could take it as being MSDOS.SYS pre-Windows DOS, but it wasn't COMMAND.COM, oh no...).
So there you have it. Something like 30-40 interrupt handlers, a command interpreter and utilities (which you could write in C) and the startup code. Yes, most of it was written in machine code, but the total source for the system is less than 5MB in size, I reckon.
When you make stuff like this you use an assembler and initially stick to using the hardware interrupts and other things that the computer's BIOS gives you. For example, when you boot A PC the boot sector is loaded off whatever boot drive you have and into memory address 07C0:000 (segment: offset, read on 8086 book). You take it from there.
Last edited by SMurf; 05-30-2005 at 09:11 AM.
I think he is asking how they wrote the first OS without an OS to write it on. My guess is that the early OSes were written in machine code. Most likely they were pretty weak but still were powerful enough to handle a simple file system and programs in some weak form. Enough to handle an assembler which could then be used for any future development. But this is just me guessing.
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
Well, that still doesn't tell us how they break through those old computers' equivalent of a no-system-disk prompt and start typing into that OSless computer the assembly codes it could accept and need as OS-related commands that start to form the OS up, and then how to save that to the disk and then run it from there. So how did they do that part--interface with the computer before it was running its OS?
Learn C++ (C++ Books, C Books, FAQ, Forum Search)
Code painter latest version on sourceforge DOWNLOAD NOW!
Download FSB Data Integrity Tester.
Siavosh K C
Assemblers existed in 50's and operating systems started appear in 50's, so I would say operating systems were written quite early in assembly, if not from beginning. If not assembled by a program, assembled by programmers.
O_o
Wow. Way to bump a useless 5 year old thread.
o_O
Give a dwarf a hammer...
Soma
> Wow. Way to bump a useless 5 year old thread.
Or a useless bump of a 5 year old thread
Anyway, the bumper should visit OSRC: The Operating System Resource Center and read all about the boot process.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.