Page 1 of 1

Total beginner who needs helpa about where to begin...

Posted: Fri Jan 07, 2005 4:15 pm
by Total NOOB
Let?s start out with the facts...
I'm a total beginner at OS-Dev, and I know a little programming language.
Those I know are:
- Visual Basic    (Which I can't use at OS-Development)
- C++      (I don't know a lot, but a little)
That?s it...

I've looked to some source codes, and I got confused... I wondered what ax means and what
0010h means... Where can I get info about it...?

So I've come to you people to ask for help... I need to know which things I need to know/learn, and where to find info about it...

There have properly been a lot of people asking the same things, but I hope you will help me just like you've helped other beginners...

Thanks...
(I know there might be some misspelling, but I?m not that good at English)

Re:Total beginner who needs helpa about where to begin...

Posted: Fri Jan 07, 2005 4:37 pm
by IRBMe
You don't need to know much about assembly to write most of an OS, but there are parts that must be written in it. So you do need to know the basics. The main benefit of knowing assembly is the better understanding you gain of the underlying machine. It's very helpful when writing an operating system to know how your C code will work at the machine level with things like registers (that's what ax is - the 16 bit accumulator register), the stack and so on. You can find quite a lot of assembly stuff on google. Try searching for the book "The Art of Assembly" it's a free e-book iirc and very good.

Obviously you can't use Visual Basic to do anything in an OS, since it has huge dependencies on runtimes which in turn have huge dependencies on much of the Win32 API. However, I wouldn't really recommend using C++ either. There are a lot of little quirks that need to be worked around when using C++ at such a low level. Believe me, I've tried and got it working but it was more hassle than it was worth. Personally, I would suggest you stick with C. It's much simpler to compile and link than a C++ OS (which requires stubs of asm to call constructors and destructors, overriding operators, about 20 compiler switches to turn off different features but to name a few things).

As for where to begin, I would recommend you read the wiki - it has lots of useful information on where to get started, setting up your environment etc.

Also, check out some sites like www.osdever.net which have lots of good tutorials.

And finally - download example kernels - lots of them, and study them hard. I have at least 20 myself. Some fairly complete, big ones, some tiny bare bones ones, some microkernerls, some monolothic kernels etc.

As a hint: the first thing you'll want to start with is the first thing that you need to worry about when the computer turns on - bootstrapping. You can either write your own boot loader (which requires good knowledge of asm, the BIOS, and some low level things like how to switch to protected mode - but is a very good and rewarding starting exercise), or use a standard loader such as GRUB (it'll do all the hard work for you). See the wiki for more information on this. If you want to start with writing your own loader from scratch, you can see a tutorial I wrote here: http://www.mega-tokyo.com/forum/index.p ... eadid=7053 which describes it in great depth. You may want to check it out either way, as it also gives some other useful information.

Re:Total beginner who needs helpa about where to begin...

Posted: Sat Jan 08, 2005 3:13 pm
by dh
IRBme's tutorial is VERY GOOD. It's on the first page right now.

I saved the "ALL IN ONE" pages of the wiki and read the basic points. Good advice within during a crisis ;)

Finally, write/type down everything you do. Makes things easier to figure out

Enjoy ;)