Where To Start
Where To Start
HOW DO I START?
I'm trying to write an OS, but I can't find any sort of help in tutorials, books, anything. The thing is they all say ,
"Find someone who can teach you."
(Why do they even bother to publish the books then??)
My Questions Follow:
-what is a good developing environment? (Windows, Linux, Unix, Mac etc.)
-what software should I use?
-which language to use? (C/C++, Pascal, Fortran, Java, Perl...(easiest please!!!)
-How to write the code?
All the very beginner question.
Smith
P.S. Please do mind that I am short of time and cannot read a bible's worth of literature.
I'm trying to write an OS, but I can't find any sort of help in tutorials, books, anything. The thing is they all say ,
"Find someone who can teach you."
(Why do they even bother to publish the books then??)
My Questions Follow:
-what is a good developing environment? (Windows, Linux, Unix, Mac etc.)
-what software should I use?
-which language to use? (C/C++, Pascal, Fortran, Java, Perl...(easiest please!!!)
-How to write the code?
All the very beginner question.
Smith
P.S. Please do mind that I am short of time and cannot read a bible's worth of literature.
- ManOfSteel
- Member
- Posts: 60
- Joined: Tue Feb 01, 2005 12:00 am
Re: Where To Start
You can freely use any environment (OS if that's what you mean). MS-DOS if you want. Some OS, like most Linux and UNIX, already have some programming and OS related programs and utilities, though, and may be preferred by some people.what is a good developing environment? (Windows, Linux, Unix, Mac etc.)
A basic ASCII text editor (notepad and edit will be fine). Some options like syntax highlighting or line counting can also be interesting.what software should I use
A compiler/assembler, of course: every language has its own compiler/assembler.
An emulator is also interesting to have if you're tired of rebooting your computer just to test a few changes. Try Bochs, it's probably the best one, it's free and open source.
Some utilities are useful like the ones that write files to the disk. Rawrite is good.
Check this: http://www.osdever.net/downloads.php
Java, Perl or the likes will not be very useful for basic OS programming.which language to use? (C/C++, Pascal, Fortran, Java, Perl...(easiest please!!!)
You may use Pascal, but most people will use C, C++ and assembler. C++ is quite difficult to begin with. You can mix C with assembler or use one of them alone (although, some parts can only be done in assembler).
I don't really understand your question. Are you asking about the basics of a programming language or about programming an OS?How to write the code
For the former: http://www.programmershelp.co.uk/, http://www.programmersheaven.com/
For the latter: http://www.osdever.net/documents.php, http://www.osdever.net/tutorials.php, http://www.nondot.org/sabre/os/, http://www.codezen.org/viridis/whitepaper.php
Last edited by ManOfSteel on Sun Apr 24, 2005 11:00 pm, edited 1 time in total.
Re: Where To Start
Thanks ALOT!
When I said:
"How to write the code"
I ment how to program the OS.
I'm Still looking through the links.
I have also got the book:
"Operating Systems: Design and Implementation second edition" which is turning out to be a slow read.
Again Thanks,
Smith
P.S: Which parts can only be written in ASM?
When I said:
"How to write the code"
I ment how to program the OS.
I'm Still looking through the links.
I have also got the book:
"Operating Systems: Design and Implementation second edition" which is turning out to be a slow read.
Again Thanks,
Smith
P.S: Which parts can only be written in ASM?
Last edited by Smith on Sun Apr 24, 2005 11:00 pm, edited 1 time in total.
- ManOfSteel
- Member
- Posts: 60
- Joined: Tue Feb 01, 2005 12:00 am
Re: Where To Start
Rather good choice. Check out the source code of Minix. If you have a copy without the CD (not an original book), you still can get the source code at the writers site, AFAIK.I have also got the book:
"Operating Systems: Design and Implementation second edition" which is turning out to be a slow read.
I'm not really sure since I'm only using assembler, but I think it's a few pieces like the boot sector's code and possibly the interrupt routine (I think you can jump to your C routines within the ASM ones). But again, I'm not 100% sure.Which parts can only be written in ASM
Re: Where To Start
I did get the original book with the CD and have look (briefly) through the code, but the book its self doesnt explain how to write the code and the order it comes in. The only hints are in the code but that makes up 45% of the book.
I need someone to teach me.
Smith
I need someone to teach me.
Smith
Re: Where To Start
The best place to start is to learn some of the languages you need. Even if you are sticking to 'C' for as much as possible you should be able to at least read asm examples and vice versa. Preferably you should have an indepth knowledge of the compiler based language that you plan to use for the majority of your coding, and be able to understand example code that is made in asm/c.
There aren't many books specifically on OS developing (as there isn't the demand) but there are a number of useful tutorials contributed by people.
Finding someone to coach you isn't that easy as each OS tends to be different and has a large list of options you may take and different points to start at or combinations of your code and 3rd party code. First you need to decide what basic design to use for your OS then ask for help when you get stuck.
An example of issues to address earlier rather than later are:
* Purpose of the OS? (Educational or usable or security etc)
* Language you want to use to write it in? (Anything compiled eg asm/c/c++/pascal but remember all the functions that are built into header/system libarys will need to be writen from scratch for your OS)
* Mode? (real mode 16bit or protected mode 32bit, the protected mode is more popular now as it offers more security and more memory is enabled)
* Filesystem? (FAT is quite easy but there are things like ext2 etc as well or you can make your own)
* Console or graphical only? (console is easier and normally done first)
* Any support for linux/windows standards and applications? (.com/.exe support or support for linux app's if they are re-compiled as opposed to writing all your own applications)
And anything else I've forgotten to mention.
Daniel
www.osdever.net
www.osdcom.info
There aren't many books specifically on OS developing (as there isn't the demand) but there are a number of useful tutorials contributed by people.
Finding someone to coach you isn't that easy as each OS tends to be different and has a large list of options you may take and different points to start at or combinations of your code and 3rd party code. First you need to decide what basic design to use for your OS then ask for help when you get stuck.
An example of issues to address earlier rather than later are:
* Purpose of the OS? (Educational or usable or security etc)
* Language you want to use to write it in? (Anything compiled eg asm/c/c++/pascal but remember all the functions that are built into header/system libarys will need to be writen from scratch for your OS)
* Mode? (real mode 16bit or protected mode 32bit, the protected mode is more popular now as it offers more security and more memory is enabled)
* Filesystem? (FAT is quite easy but there are things like ext2 etc as well or you can make your own)
* Console or graphical only? (console is easier and normally done first)
* Any support for linux/windows standards and applications? (.com/.exe support or support for linux app's if they are re-compiled as opposed to writing all your own applications)
And anything else I've forgotten to mention.
Daniel
www.osdever.net
www.osdcom.info
Re: Where To Start
I'd like an OS thats both Console and graphical (if possible (I'll add an attachment to the next post with my planning).
Re: Where To Start
Has anyone heard of the book "OS Development for Dummies" ??
Smith
Smith
- ManOfSteel
- Member
- Posts: 60
- Joined: Tue Feb 01, 2005 12:00 am
Re: Where To Start
These will require a lot of time especially if you're going to use protected mode. Even to have the most basic text-based shell, you must have of lot of other things set first, like the PM itself and everything that is linked to it (GDT, IDT, ...), you'll have to program the PIC and at least have a few software interrupt handlers for the "character printing" and "keyboard key reading" routines you'll be using in your console.I'd like an OS thats both Console and graphical
The graphical one should come after a very long time, because you'll probably need much more programming like at least a reliable memory manager.
I suggest you first make a very basic 16-bits real mode OS so that you can get the basics of operating systems and computer hardware functionning, before jumping to the world of protected mode where you'll have a lot of reading to do. At that time, you may begin with the Intel manuals (especially the "System programming" one).
Re: Where To Start
I would suggest Linux with XFCE or GNOME with the Anjuta IDE and gcc.-what is a good developing environment? (Windows, Linux, Unix, Mac etc.)
XFCE is better if your looking for a light desktop with lots of features, its basicly GNOME but lighter... supports gnome themes and programs
Re: Where To Start
Which distributions come with GNOME, XFCE etc??
Or where to get them as I already have Linux.
Or where to get them as I already have Linux.
Re: Where To Start
-what is a good developing environment? (Windows, Linux, Unix, Mac etc.)
If you intend writing a commercial operating system choose Windows
-what software should I use?
Your mean programming tools, assembler, compiler etc.
If you use Windows use Borland C, and notepad.
-which language to use? (C/C++, Pascal, Fortran, Java, Perl...(easiest please!!!)
C or if you want something to ressemble Basic, Fortran.
-How to write the code?
Write a bootsector.
Write a simple kernel and load it.
Add memory management
Add process management.
and the rest
If you intend writing a commercial operating system choose Windows
-what software should I use?
Your mean programming tools, assembler, compiler etc.
If you use Windows use Borland C, and notepad.
-which language to use? (C/C++, Pascal, Fortran, Java, Perl...(easiest please!!!)
C or if you want something to ressemble Basic, Fortran.
-How to write the code?
Write a bootsector.
Write a simple kernel and load it.
Add memory management
Add process management.
and the rest
Re: Where To Start
Where can I get examples of a good bootsector and kernel. I have already looked at the links at www.osdever.com/downloads.php
- ManOfSteel
- Member
- Posts: 60
- Joined: Tue Feb 01, 2005 12:00 am
Re: Where To Start
Maybe some free/open source OSs will help you a little.
This is a list of OSs containing some open source ones, Crasha's CS TBOS, V2OS, Menuet OS.
This is a list of OSs containing some open source ones, Crasha's CS TBOS, V2OS, Menuet OS.
Last edited by ManOfSteel on Tue May 03, 2005 11:00 pm, edited 4 times in total.
Re: Where To Start
Has anyone heard of the book OS Development for Dummies and the program OS Creator??