Page 1 of 1
How you all started?
Posted: Sat Mar 23, 2013 3:58 am
by catalin
Hello All!
Like many from here I started to learn how to build a simple operating system just for now and I know without learning asm and c my trip in the world of OS will finish fast so I started first to learn asm for 8086 chip now I want to ask if is well for now I want to understand the basic and after to move at something more hard.First I learned the numbers from binary and hexadeciaml systems I learned how to convert from one to another to understand more better beacuse without a base I will not understand nothing.I follow some tutorials beacuse I don't have money for now to buy some books......But I understanded very welll.C will be easy beacuse I already know c++ and others languages.So I want to know how you peoples started to build an OS?
Thanks very much!!!
Re: How you all started?
Posted: Sat Mar 23, 2013 4:14 am
by p0s1x
I started with MinGW, dd for Windows and Bare Bones for C. Good luck!
Re: How you all started?
Posted: Sat Mar 23, 2013 4:29 am
by dozniak
p0s1x wrote:I started with MinGW, dd for Windows and Bare Bones for C. Good luck!
You haven't started yet, judging by your other posts.
Re: How you all started?
Posted: Sat Mar 23, 2013 4:52 am
by p0s1x
dozniak wrote:p0s1x wrote:I started with MinGW, dd for Windows and Bare Bones for C. Good luck!
You haven't started yet, judging by your other posts.
I started, but ld can't make flat binary. I have a loader and kernel with 5 headers (all by me).
Re: How you all started?
Posted: Sat Mar 23, 2013 5:36 am
by iansjack
but ld can't make flat binary
Is that a misprint? Of course "ld" can make a flat binary.
Re: How you all started?
Posted: Sat Mar 23, 2013 5:48 am
by iansjack
Like many here, I started a long time ago in the days of the 8080 and 6502. Processors are more complicated nowadays, but on the other hand it is much easier to come by the necessary information.
If I was starting out today I would follow one of the many tutorials available on the Internet on assembler programming. Once fairly familiar with that I would then read a few books on OS design (even though you want to design your own OS there's no point in trying to reinvent the whole of OS theory from scratch - and at least that will give you some idea of the problems to be addressed). And download the Intel/AMD manuals and study them carefully, even if you don't understand it all first time through. Then try to write a very simple program (you can't really call them kernels) that echos a single character to the screen making no use of BIOS calls. And take it from there.
I know that people successfully use Windows or OS X for OS development, but they don't make it easy for you. I would highly recommend that you use Linux or FreeBSD for this task; the tools available there are second to none.
If you want a rest from OS development, try writing a compiler. It's another challenging task which requires pretty comprehensive understanding of your target processor, but easier - particularly from the debugging point of view - than OS development.
Re: How you all started?
Posted: Sat Mar 23, 2013 7:45 am
by p0s1x
iansjack wrote:but ld can't make flat binary
Is that a misprint? Of course "ld" can make a flat binary.
Error operation on non-PE file.
Re: How you all started?
Posted: Sat Mar 23, 2013 9:21 am
by thepowersgang
I, interestingly, started by doing things in exactly the way I now tell the newbies not to do. With very little prior programming experience, I dove into bran's tutorial. From there it was feeling my way around concepts using kludges and poorly understood tutorial code.
That said, I do like to think that I'm different to the current crop of newcomers, mostly because I went at most things alone, and only asked for help when I had exhausted all other avenues (I'm still stumped with the first question I posted on this forum).
So, some hints for newcomers - Read EVERYTHING, and if you are having troubles understanding (due to English difficulties) consider asking someone for clarification on the meaning of a statement, instead of asking for the answer to your question.
Re: How you all started?
Posted: Sat Mar 23, 2013 3:09 pm
by sortie
Yeah, I started much like thepowersgang with various tutorials that weren't entirely up to code. I've made lots of mistakes, but somehow I managed to refactor myself out of that mess and my system is turning into something nice these days.
Re: How you all started?
Posted: Sun Mar 24, 2013 7:10 pm
by Mikemk
@p0s1x
GCC Cross-Compiler
@OP brokenthorn.com has a good (if incomplete) set of tutorials. I stopped understanding when it switched from assembly to c++, but i've learned enough that i can now translate c++ to assembly (but not write c++). In other words, knowing c/c++ is helpful for using tutorials.
also, the obvious, osdev wiki (look up for link)
Re: How you all started?
Posted: Mon Mar 25, 2013 7:09 am
by greyOne
I started by taking a short course in kernel development at the U of T.
It was surprisingly useless however.
Re: How you all started?
Posted: Mon Mar 25, 2013 7:58 am
by brain
Well, this is an interesting question. I guess it depends on how far back I think my starting point is. I started out on the 6502, doing inline assembly in the BBC BASIC interpreter when i was 13.
Times have moved on a lot since then and i didn't attempt anything like a whole OS until i was about 19. This was a mess of assembler and batch scripts to call NASM and rawrite, which produced a pretty basic real-mode OS.
I then abandoned OS development for over a decade, coming back to it only recently and writing something a little more in-depth in C, which oddly enough is designed to mimic the systems i started out on all that time ago - except I intend to enhance and build upon, not just 'emulate' these systems, bringing them into the present day.
Real life as always finds a way of keeping me from finishing my projects, so i haven't actually added anything new to my OS in about 6 months. Some day i will find time though...
Re: How you all started?
Posted: Wed Mar 27, 2013 5:59 am
by Prochamber
If you want to learn assembly I would recommend the book "The Art of Assembly" (DOS edition).
You can read it online here or print it off if you wish from here:
http://cs.smith.edu/~thiebaut/ArtOfAsse ... ofasm.html
It's fairly old and covers the MASM assembler under DOS but most of the techniques can be easily ported
to assemblers such as NASM [Netwide Assembler] and FASM [Flat Assembler] that many hobby operating system use.
Chapter 6 is also a great reference of all the 386+ CPU instructions.
I would recommend that you start by messing around with someone else's operating system first to get some experience. Write simple programs and edit the kernel, add, edit and modify API functions or other parts to get a feel of how it all works.
I started hobby OS in MikeOS, a well documented OS that aim to teach people how operating systems work.
http://mikeos.berlios.de/
After I gained enough knowledge, I eventually created my own operating system based off it, TachyonOS.
https://code.google.com/p/tachyon-os/
Re: How you all started?
Posted: Wed Mar 27, 2013 6:29 am
by iansjack
Error operation on non-PE file.
Make life easy for yourself and use elf object files, not PE.