Tuesday, September 29, 2009

Getting Started

[[edito]] I once was active as PypeClicker, working on my dream Operating-System project: Clicker. Despite this time is over, there are thoughts on OS programming that I wish I could share. None of my other blog seems to be the proper place to do this, so I open this one, that will also compile recovered parts of the OSFaq I was involved in or the Wiclicker (the project's wiki that has been disabled by some unknown events). I am afraid all the links below are broken by now.

Selecting your destiny ...

First things first, it's best to have a good setup of GNU tools on your system. Linux distributions usually have all the utilities you could want preinstalled; for a Windows installation, installation of Cygwin is recommended.

This is a list of the most valuable ones
  • binutils (containing the assembler as, linker ld, disassembler objdump, and other useful things);
  • Compiler Collection (GCC) (containing the C compiler gcc and the C++ compiler g++, plus more exotic ones e.g. for Fortran or ADA);
  • grep and sed (which allow for powerful and complex search / search & replace from the command line);
  • make (for automating the build process, which becomes really helpful once you have more than a handful files);
  • diffutils (containing diff, cmp and diff3 to show where files differ).
  • perl which can save you hours in miscellaneous text-manipulation tasks. You'll be using sooner or later, so rather install it soon ;)

Visit some Recovery-and-Save-Point Inns

Using some kind of version control system is also strongly recommended, so you can easily undo changes, or check what changed since the last known working version of your code. There is a wide variety of VCS packages available. If you're working alone and on one machine only, RCS might be enough for you. Traditionally, CVS has been the package of choice for collaborative, networked development; but that has found strong competition lately, e.g. in Subversion being easier to set up, maintain, and use as well as being more powerful, while being largely compatible in syntax.

People keep arguing about whether to use the Netwide Assembler (NASM) instead of GNU as which comes with the binutils package. NASM is probably the more powerful of the two, while 'as' integrates better with GCC (and supports a variety of platforms).

Getting Additional Equipment (Weapons, Shield, Armor etc.)

Make sure you downloaded the latest Intel Manual and got a deep look through it. Check Operating System Resource Center for tutorials about 'how to set up protected mode' and don't hesitate to spend Kbps in downloading the preciousss informations about all the PC internals you'll find there. Then head yourself to Bona Fide's inn and fill your bag with all the tutorials you may wish to have about ProtectedMode, interrupts, etc. Another good resource point is the OSDEV Community Portal.

Don't miss GRUB too. It's given for free at the southeast corner of the village and will be a very valuable help in the first dungeon in your Quest for DPL0 ring ...

Join the Fellowship

If your questions are still unanswered, you can find Schol-r-lea the Wise, TimRobinson the Grey, and the others on the OS development board of mega-tokyo's forum.

Good Luck....