also @ TechSpot: HP TouchPad running Android 4.0 Ice Cream Sandwich
Welcome to the TechSpot OpenBoards. Please read the FAQ if you have any questions. Sign up or Login to participate.

Go Back   TechSpot OpenBoards > TechSpot Community > General Discussion

Begin your free trial now Pay-as-you-go options starting at $10/user/month

How Do You Write Operating Systems?

Reply
Thread Tools Search this Thread
  #1  
Old 02-22-2007
TechSpot Member
 
Location: Virginia
Member since: Nov 2006, 94 posts
System specs
How Do You Write Operating Systems?

Ok, how did Bill Gates and all the others create Operating Systems? Lets say I have a blank floppy and HD. How would you start? It just cant seem possible!



--Daniel L
  #2  
Old 02-22-2007
cfitzarl's Avatar
TechSpot Chancellor
 
Location: Boston, MA
Member since: Jun 2006, 2,519 posts
System specs
It takes yeers of programming, coding, and securing. I'm not sure the details, I am sure of that.
  #3  
Old 02-23-2007
TechSpot Addict
 
Location: Harrisburg, PA USA
Member since: Jan 2006, 676 posts
System specs
It depends on the complexity of the operateing system. A good programer could write a simple command line OS with no included utilities and no security in a matter of hours. A modern OS with lots of included utilities, a complex GUI, and high levals of security Like Vista or OSX can take years to develop and a team thousands of employees.
  #4  
Old 02-23-2007
cfitzarl's Avatar
TechSpot Chancellor
 
Location: Boston, MA
Member since: Jun 2006, 2,519 posts
System specs
Although sometimes I think that if we put a room full of monkeys in front of dos, we could come up with an operating system better that what a lot of people have *cough*Windows*cough* ...I'm just kidding...
  #5  
Old 02-23-2007
TechSpot Member
 
Location: Virginia
Member since: Nov 2006, 94 posts
System specs
My question refers to their not being an OS. If their is no program to write your os, how do you do it?


--Daniel L
  #6  
Old 02-23-2007
cfitzarl's Avatar
TechSpot Chancellor
 
Location: Boston, MA
Member since: Jun 2006, 2,519 posts
System specs
Good question....my brain hurts now ...
  #7  
Old 02-23-2007
TechSpot Evangelist
 
Member since: Aug 2004, 25,949 posts
You might find some of the links HERE of interest.

Regards Howard
  #8  
Old 02-23-2007
Nodsu's Avatar
TechSpot Evangelist
 
Location: Estonia
Member since: Feb 2002, 9,431 posts
System specs
Quote:
Originally Posted by daniel161
Ok, how did Bill Gates and all the others create Operating Systems? Lets say I have a blank floppy and HD. How would you start? It just cant seem possible!
Quote:
My question refers to their not being an OS. If their is no program to write your os, how do you do it?
Bill Gates stole his OS from other people..

As for how to get a computer going..

First thing you do is write a trivial assembler for that machine (on another machine). This way you can write pure machine code programs for your target. Hopefully, whoever built the machine/CPU, provides some instruction set reference

Using the assembler, you write a compiler for your target (on another, working machine). Once you have a target compiler, you can write any software you like (on another machine). At first, you would transport your programs to your target using raw disk images. As your codebease increases, you can use files or networking later on.

That's how it is done in modern times.

Back in the day, the target machine would have a some sort of an input system, either for pure machine code or some crude programming language like BASIC. You would use these machine inputs or the built-in PL to input your own programs (or an OS even) by hand.
  #9  
Old 02-23-2007
cfitzarl's Avatar
TechSpot Chancellor
 
Location: Boston, MA
Member since: Jun 2006, 2,519 posts
System specs
Quote:
Bill Gates stole his OS from other people..
I heard someone say that before. If he did actually steal it, and there was proof, wouldn't he have been sued for doing it ? Without proof, no one can make a correct assumption...well...most of the time. I knew Bill Gates was a money-hungry, corporate, greedy, arrogant person ...just kidding *uncrosses fingers* .
  #10  
Old 02-23-2007
halo71's Avatar
TechSpot Maniac
 
Location: Augusta, GA.
Member since: Jun 2005, 1,290 posts
Its the chicken before the egg question. I think he is asking what or how was a program written to even start to write an OS. How did someone know how to write a program to write an OS. What started it all.....I think thats what he is askinga anyways.
  #11  
Old 02-23-2007
TechSpot Member
 
Location: Virginia
Member since: Nov 2006, 94 posts
System specs
Yep ^^^ Thats my question!


--Daniel L
  #12  
Old 02-23-2007
Boogityboo04's Avatar
TechSpot Booster
 
Location: Madison, WI
Member since: Jan 2006, 351 posts
System specs
I think to start off with no other machines in existence to create a assembler you would essentially use a board of switches to input binary or machine code or whatever.

As far as I can remember thats how my dad did it when he built a computer completely from scratch in college. It had about the functionality of todays pocket calculators, but back then it was quite a job.
  #13  
Old 02-23-2007
Nodsu's Avatar
TechSpot Evangelist
 
Location: Estonia
Member since: Feb 2002, 9,431 posts
System specs
Quote:
Originally Posted by cfitzarl
If he did actually steal it, and there was proof, wouldn't he have been sued for doing it?
Something that is legally correct, does not have to be right by common sense. And vice versa of course.
  #14  
Old 02-23-2007
beef_jerky4104's Avatar
Banned
 
Location: The Basketball court...
Member since: Jan 2007, 1,094 posts
System specs
Quote:
Originally Posted by Nodsu
Bill Gates stole his OS from other people.
Actually he didn't steal it. At the time most of the code and stuff was open source, which means it is free to everyone to use (Unix, the OS of the internet). Then he went "Hey I bet I jack this and make money!". So technically speaking he didn't steal, however it wasn't fair since he gets credit while it was some one elses work which he exploited.
  #15  
Old 02-24-2007
Nodsu's Avatar
TechSpot Evangelist
 
Location: Estonia
Member since: Feb 2002, 9,431 posts
System specs
Erm.. QDOS was not open source.. Why would Microsoft pay money for it if it was?
Please read up on history.
  #16  
Old 04-20-2007
DataMatrix47's Avatar
Newcomer, in training
 
Member since: Apr 2007, 1 posts
It's actualy pritty darn complex. The very first thing you could do is get a blank 1.44 Floppy disc, a ASCII hex table and Windowses DEBUG

1. insert floppy in to the FDD

2. start the commnand prompt

3. run debug (just type 'debug') (example: c:\>debug)
you'll see:
-

4. now typein 'l 0 0 0 1' (no quotas)
then type 'a 3e'
the 3E address is the beggining of the FD boot system.
now you should see:
????.003E:

5. start writing assembly (some people call it incorrectly ASSEMBLER) code
my exsample code:
Code:
MOV     AX,0E44
INT     10
MOV     AX,0E61
INT     10
MOV     AX,0E74
INT     10
MOV     AX,0E61
INT     10
MOV     AX,0E4D
INT     10
MOV     AX,0E61
INT     10
MOV     AX,0E74
INT     10
MOV     AX,0E72
INT     10
MOV     AX,0E69
INT     10
MOV     AX,0E78
INT     10
MOV     AX,0E34
INT     10
MOV     AX,0E37
INT     10
MOV     AX,0E0D
INT     10
MOV     AX,0E0A
INT     10
JMP 003E
>>>you can skip the next few lines
can you see the diference between
MOV AX,0E34
and
MOV AX,0E37
?
yes, it's 34 and 37. these are Heximal values. 34h='4' (character); 37h='7'; 44h='D'; 61h='a' etc.
this writes a new line:
Code:
MOV     AX,0E0D
INT     10
MOV     AX,0E0A
INT     10
0D=\n
0A=\r
int 10 is a BIOS video interrupt.
JMP 003E JuMPs to the offset address 3E, from were the program begins.
>>>back on track.>>>
after you press enter at the last row press it again. here you are gagin at the '-' state.

6. write 'w 0 0 0 1'. that will save your code to the floppy disk.
6.2. write 'q' to stop the program DEBUG

7.reboot your computer and boot from the floppy. on some systems like mine you press F8 at the mem check screen to open boot device menu. On other systems you got to press DEL to enter BIOS and change your boot device settings

8. after the floppy boots you shold see a message.
my example displays 'DataMatrix47' numerous times, every time on new line.

Press ctrl+alt+del to restart the computer.

SUMMARY: To make your own OS, furs you got to learn assembler, then, when you develop your bootloader, start writing the KERNEL (the core of every os) C is a recommended language, but you wount be able to use predefine functions, like PRINTF, SCANF, etc.
This was just an example, not even remotly close to an operating system. THE OS HAS TO TAKE CARE of 1000 of 1000 of things.

PS: if someone is interested, i can give a code file and a BAT script to write the code to a disk to see the result, without wasting 0.5-1 hours.

Last edited by DataMatrix47; 04-20-2007 at 08:26 PM..
Reply

Similar Topics
Topic Replies Forum
Two operating systems 1 Windows OS
Multiple Operating Systems 2 Windows OS
3 operating systems 2 Other Hardware
operating systems 1 Windows OS

Thread Tools Search this Thread
Search this Thread:

Advanced Search
All times are GMT -4. The time now is 04:50 AM.