hi i am programming for about 4 years and i want to learn how to make a operating system. for ex window, mac or unix. And i am think of storing it on a disk. I have no idea how to get started. can any one tell me the steps?
also plz explain when you are talking about software name or other hardware part.
I want to use C languae to program. and avoid programming on unix or linus. i wan tto use windows.
i tried that link but they dont really explain how to do it. for ex. http://www.osix.net/modules/article/?id=359
it talk about Tools, Terminology, but it dont really tell how to setup Bootloader or Kernel or how to copy bootloader data etc.
OSDev is a great resource.
Warning: Only for real warriors and not the faint-hearted; not a step-by-step manual but rather a general repository for OS development.
I don't think a 'how-to' exists for OS development. When all else fails, you can browse through stuff like
Here're some others:
First, get a copy of Oracle VirtualBox to run the new OS inside of.
And Holy Crap! That OSDev is good stuff! I can't believe I've never seen that before. (Never gave serious consideration to writing an OS, but after seeing that, I just might...) Props, asrockw7.
Edited by DeanMSands3
As an old hand there in days gone by, I would warn you that the regulars at the OSDev Forums don't suffer fools or newbies. It's an excellent resource, but if you do post there, be on your toes, use your clearest proper English, and do everything you can ahead of time to prepare your questions.
In other words: Stay Alert! Trust No One! Keep Your Laser Handy!
(Seriously, it really is a great message board, but after years of people wandering in to ask irrelevant or silly questions, they've become very defensive. Lurk and get a sense of the place before posting, if at all.)
Edited by Schol-R-LEA
Among the things you need to decide before you begin are:
Do you know enough about both programming and computer hardware to write an OS? How good are you with C? With Assembler? What assembler(s) do you know, and can the one you are using produce a flat binary file (or an ELF file, if you are using GRUB)? What do you know about compilers and how they work? About linkers and loaders? About file systems? About memory management? About process management and interprocess communication?
What hardware are you writing it for? I would assume that it is an x86 based PC of some sort, but it is possible you'll want to write for soemthing like a Pegasus (PowerPC-based) or a smartphone (which could be any of a number of things, but are mostly ARM-based) or something like an Arduino card. If it is a PC, is it a current day one, or some older box you happen to have around or picked up somewhere? What are the limitations of the system you are writing for?
Assuming a PC, are you going to write a 16-bit real-mode system, or are will you make the jump to 32-bit protected mode (or even 64-bit long mode)? Real mode is a lot simpler starting out, but is painfully limited. Protected mode offers the full power of the 32-bit system, but involves a good deal more work to set up memory protection, interrupt handling, and so forth.
Do you want to write your own bootloader, or use an existing one such as GRUB? While writing your own a boot lader can be an interesting taks, it isn't a very practical one - it can be a major detour and distraction from writing your kernel, and is quite difficult if you aren't an expert assembly language programmer. Using GRUB or some similiar multi-boot loader not only avoids this doing this step on your own, but also gives quite a bit of help in moving into protected mode, as GRUB (and most of it's alternatives) perform the actual mode switch for you. Writing a simple Volume Boot Record, or at least reading about how to write one, is worth doing as an exercise, but it probably isn't the thing to do for your actual system.
What is your development environment, and how does it impact your OS development process? You've mentioned wanting to use Windows, which is fine, but you need to consider how that choice affects what tools you have available and so forth.
What toolchain are you using? Most OS-development material assumes that you are using open-source tools, and in particular GCC for the C compiler and either GAS or NASM for the assembler. It is possible to use other tools - several people have used Visual C++, for example - but using a commercial toolchain can limit your ability to self-host your system when you've developed it to the point where it can be used as a development platform itself.
How will you be testing your OS? It is strongly recommended to use an emulator (e.g., Bochs) or virtualizer (e.g., VirtualBox), partly to protect your hardware but mostly because it vastly improves the turn-around time during testing - you don't have to wait for your system to reboot back into your development system in order to make changes to the OS, as the OS will be running as just another application under Windows.
What file formats will you be using? This really breaks down into three other questions: One, what executable format will you use, two, are you going to support multi-byte text such as Unicode, and three, will your files have resource forks or anything similar aside from the their normal contents?
This isn't meant to scare you off, but you should be aware of just how much really goes into OS development before you jump into it.
Edited by Schol-R-LEA
Hi guys, I'm playing around ith optionals a little, but I'm not surewhether this is the correct behavious as I'm getting a null pointer exeption (I thought the point of ...
So before I went and posted ~800 lines of code, I have 2 questions:
1: What is the preferred way for us to post "complex" C++ (of course, ...
I Currently working on a project to schedule installers to do installations.
When scheduling the user will select the day of intall and if the number of days the ...