Before I joined the ranks at Microsoft, a hobby I started to take up was Operating System development. Technically, I didn't get very far yet (I had just started). My "kernel" (if you can even call it that) basically just printed "Hello World" to the screen. But heck, it was booting up from a floppy, loading the kernel into memory, and executing to do that (in a VM of course, I wouldn't even dare run my hobby OS on an actual machine :P).
Unfortunately, for the last several months I have been in "corporate housing" while my wife and I sell our house back in the Portland area. This means that I don't have access to various belonging of mine because they are in storage which we don't have access to. Included in this list of belongings is my main desktop computer that I was using as my development box. I have since switched over to developing with my laptop, but my OS development environment was on that machine. I haven't had the time to recreate that environment, so my hobby has kind of fallen by the wayside as of late.
Recently though, I came across these two articles which outline how you can use Visual Studio to compile your own Kernel. More specifically, it outlines how to compile a PE-format executable which can be booted by using GRUB. To my delight, I was able to recreate his findings and write the hobbyist OS I had started before in about 20 minutes. I would go into the compiler/linker options that make this possible, but why don't you just read the original resources.
However, word to the wise, OS development is not something you can just waddle on into. I would advise against using OS development as a way to learn C for example. OS development should be fun, so do yourself a favor and don't frustrate yourself from the get go :).
Now, if you're a geek like me where the idea of messing around with writing your own OS sounds exciting, there are some resources you should definitely check out that I've come across (I know they've made it easier on me):
Websites
- Bona Fide OS Development - A website loaded with tutorials and documents. Be sure to check out Bran's Kernel Development Tutorial if you're a new guy in this area of town.
- OS-FAQ Wiki - This website contains a bunch of very valuable tutorials as well as useful pages in general. While there is a bunch of stuff here, if you're a beginner, you'll want to make sure to check out the following links:
- OS Development Forum - A very active forum with discussions about OS development, design, etc.
Books
Okay, that should keep you busy for a while (I know that I've just tipped the iceberg of all those resources :P). The best advice I can give comes from the OS-FAQ Wiki: make sure you understand everything that is going on. Don't just copy code and continue plugging along. You need to understand what the code is doing. If you use the code, understand what it does. After all, if you don't, how do you expect to fix it if it breaks (and inevitably with OS development it _will_ break).
Once you're comfortable with the boot process, how grub works, getting into C land, etc., then feel free to check out the two articles on using Visual Studio 2005 to build your OS. The good news? Every tool you will need (at least for the first huge chunk of it) is available for totally free (assuming of course that you can do it from VC2005 Express which I haven't tried yet). Is there a better price than that with all the resources above at your disposal as well? I think not :).
Enjoy and happy dev'ing :).