Welcome to the TechSpot OpenBoards. Please read the FAQ if you have any questions. Sign up or Login to participate.
|
|||||||
Begin your free trial now
Pay-as-you-go options starting at $10/user/month
Pay-as-you-go options starting at $10/user/month
How Do You Write Operating Systems?
![]() |
|
|
Thread Tools | Search this Thread |
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
It takes yeers of programming, coding, and securing. I'm not sure the details, I am sure of that.
|
|
#3
|
|||
|
|||
|
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
|
||||
|
||||
|
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
|
|||
|
|||
|
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
|
||||
|
||||
|
Good question....my brain hurts now
...
|
|
#8
|
||||
|
||||
|
Quote:
Quote:
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
|
||||
|
||||
|
Quote:
? 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
|
||||
|
||||
|
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
|
|||
|
|||
|
Yep ^^^ Thats my question!
--Daniel L |
|
#12
|
||||
|
||||
|
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
|
||||
|
||||
|
Quote:
|
|
#14
|
||||
|
||||
|
Quote:
|
|
#15
|
||||
|
||||
|
Erm.. QDOS was not open source.. Why would Microsoft pay money for it if it was?
Please read up on history. |
|
#16
|
||||
|
||||
|
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 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 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.. |
![]() |
| 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 |
|
|
All times are GMT -4. The time now is 04:50 AM.



...I'm just kidding...
? 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
.
Two operating systems