The Creation of an OS

This is a discussion on The Creation of an OS within the Tech Board forums, part of the Community Boards category; how would someone have built the first operating system without somethign previous? Was it done just in machine code? If ...

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

    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
    Location
    Newport, South Wales, UK
    Posts
    1,262
    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
    Posts
    546
    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
    Posts
    5,006
    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
    Posts
    1

    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
    Location
    Tehran
    Posts
    1,231
    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
    Posts
    131
    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
    Posts
    4,231
    O_o

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

    o_O

    Give a dwarf a hammer...

    Soma

  9. #9
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,499
    > 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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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, 01:49 AM
  2. Newton + Einstein were wrong!
    By Jez in forum A Brief History of Cprogramming.com
    Replies: 64
    Last Post: 12-14-2004, 01:24 PM
  3. a simple OS
    By DavidP in forum A Brief History of Cprogramming.com
    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, 02:11 PM
  5. How do they compile code for an OS ?
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 49
    Last Post: 03-27-2002, 11:16 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21