Bulding an operating system

Started by
40 comments, last by johnc82 20 years, 2 months ago
I fear that all of this criticism is going to cause you to invoke some will power saying "they said I couldn''t...but I did," when you''re are SERIOUSLY going to fail. I''m scared for j00 :|
Advertisement
Strange. At no point does "johnc82" say anything about developing an OS for the PC platform, yet everyone has made this assumption.

It''s quite feasible to build a basic OS on a fairly closed platform. If it''s for educational purposes, it''s even fun. Pick a device with stable hardware and start reading hardware specs. I''ve seen an OS built for GBA. I''ve written mini-OSes for the older platforms I wrote games for. (Sinclair ZX Spectrum and Commodore Amiga.)

It''s not THAT hard, just as long as you aim for a sensible target.

--
Sean Timarco Baggaley
Sean Timarco Baggaley (Est. 1971.)Warning: May contain bollocks.
Just pulling some of my University textbooks off the shelf...

"Modern Operating Systems"
Andrew S. Tanenbaum
ISBN 0-13-588187-0
- A general overview of the concepts involved.

"Microcomputer Systems: The 8086/8088 Family"
Yu-Cheng Liu, Glenn A. Gibson
ISBN 0-13-580499-X
- Assembly for early x86 systems

"Real-Time Concepts for Embedded Systems"
Qing Li
ISBN 1-57820-124-1
- A recent acquisition of mine in case you''re interested in embedded systems.

In addition, you can find plenty of assembly resources on the web. Other OS concepts, such as multitasking, filesystems, device drivers, etc. can also be found by doing searches on Google.
thank for the reply....


1)the reason i want to build OS is for eduction purpose....... there are not much type of crossplatform OS... and some fo them are not fully or strongly implemented in OO mannager.... if LINUX can do it so am I :D .....

2)the reason of using assembly is because it consider the lowest level programming language that can directly communicate with the hardware itself........... although it very havoctic and challenging..... (like now I''m trying to slove the string problems.... which already almost a month :-P..... thanks to int 21H (DOS Interrupt)).... plus it can be use for reverse engineering

3)of course everthing start has to start from small and simple......... and accomplish it piece by piece (OO) :-P
:-)
Writing an OS isn't as hard as some of you seem to think, there's tons of hobbyist developers hard at work on their own projects. Obviously you'll never have something like Windows, but that's not really a reasonable goal.

Writing it completely in assembly is inane, however.

Check out the MegaTokyo boards.


[My site|SGI STL|Bjarne FAQ|C++ FAQ Lite|MSDN|Jargon]
Ripped off from various people

[edited by - wild_pointer on August 6, 2003 6:19:15 AM]
[size=2]
quote:Original post by johnc82
thank for the reply....


1)the reason i want to build OS is for eduction purpose....... there are not much type of crossplatform OS... and some fo them are not fully or strongly implemented in OO mannager.... if LINUX can do it so am I :D .....

2)the reason of using assembly is because it consider the lowest level programming language that can directly communicate with the hardware itself........... although it very havoctic and challenging..... (like now I''m trying to slove the string problems.... which already almost a month :-P..... thanks to int 21H (DOS Interrupt)).... plus it can be use for reverse engineering

3)of course everthing start has to start from small and simple......... and accomplish it piece by piece (OO) :-P


First off, if you''re trying to solve a string problem by using int 21h, you''re already on the wrong path. You have no dos interrupts when you boot your machine with your own boot loader (or even someone elses), so forget about int 21h. If you are going for a real mode (16-bit) operating system (much simpler than 32-bit pmode), look into interrupt 10h to do any video stuff. Also, if you decide to do the 32-bit pmode, you lose even the bios interrupts unless you implement some sort of v86 call gate. I wrote a 16-bit OS that loaded, loaded an .exe compiled in turbo c/c++ (using my custom libs) and ran my software 3d engine (with texture mapping). It had read only fat12 support, and a few other goodies, but was pretty minimal and didn''t take that long to write. I am now attempting to write a 32-bit pmode OS, and am moving on to the memory manager and multi-tasking stuff, then it''s onto the keyboard, mouse and video drivers. So far it''s 100% assembly .
Hey, don''t kill the guy... if I had the knowledge and enough time, i''d like to write an OS myself, just for the cause of EXPERIENCE.

But i can assure you, i wouldn''t write the entire OS in assembly, just the loader as soemone mentioned and the core files. the HAL.DLL in Win2K / WinXP is written in assemby...
Ethereal
It's not that assembly is hard, but making long, logical, and maintainable programs with it is!

HALs are one field where it's usable, however: there the code needs to be run as close to the actual hardware as possible.

[edited by - Nik02 on August 6, 2003 6:55:32 AM]

Niko Suni

I have an pdf ebook tutorial called MMURTLV which is a 32 bit OS written by some guy and goes through each step in his book. Strangely enough I got the book from a Princeton website I believe. The book is still in print and sold in bookstores yet it was freely available from a reputable school website. I downloaded it anyhow! I might try to find the url or someone can type in OS in google and you might come out with the url. I haven''t gotten into it yet though but it seems to be a good book for a beginner. If anyone can''t find the url I''ll upload it to my server and let you download it just email me.
Well, R2D22U2..
quote:Original post by Metus
the HAL.DLL in Win2K / WinXP is written in assemby...


just interested to know how you know that

This topic is closed to new replies.

Advertisement