Thread: The Creation of an OS

  1. #1
    Set Apart -- jrahhali's Avatar
    Join Date
    Nov 2002

    The Creation of an OS

    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!

  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Newport, South Wales, UK
    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.

  3. #3
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    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.

  4. #4
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    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.*

  5. #5
    Registered User
    Join Date
    Sep 2010

    Still Doesn't Tell Us...

    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?

  6. #6
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Quote Originally Posted by jrahhali View Post
    ...Was it done just in machine code? If so, how would they have programmed in machine code to accomplish this, exactly?
    What do you mean? They placed machine instructions in binary form in the place where bios searches for 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

  7. #7
    Registered User
    Join Date
    Jul 2007
    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.

  8. #8
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008

    Wow. Way to bump a useless 5 year old thread.


    Give a dwarf a hammer...


  9. #9
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    > 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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Detecting if OS is Windows???
    By Ktulu in forum Windows Programming
    Replies: 2
    Last Post: 11-19-2006, 02:49 AM
  2. Newton + Einstein were wrong!
    By Jez in forum A Brief History of
    Replies: 64
    Last Post: 12-14-2004, 02:24 PM
  3. a simple OS
    By DavidP in forum A Brief History of
    Replies: 8
    Last Post: 06-06-2004, 10:47 PM
  4. Linux OS to Windows OS code
    By sw9830 in forum C Programming
    Replies: 2
    Last Post: 02-28-2003, 03:11 PM
  5. How do they compile code for an OS ?
    By Nutshell in forum A Brief History of
    Replies: 49
    Last Post: 03-28-2002, 12:16 AM