GameBoy Assembly Language Primer


Getting Started

This primer is geared towards beginners but it might be helpful to those that have more advanced knowledge as well. It is designed to let a person immediately try the samples to familiarize them with GameBoy Programming.

The samples in this primer are geared around the RGBDS GameBoy Assembler written by Carsten Sorensen. This assember was chosen because it is by far the most powerful GameBoy assembler currently available and it is also currently free as well. To compile the samples found in these examples you need the following files from the RGBDS distribution somewhere in the DOS path: RGBASM.EXE, RGBFIX.EXE, and XLINK.EXE (or RGBLINK.EXE). If you are not sure how to include these in the DOS path then just copy them to C:\WINDOWS and you should be set.

The samples you see in the following pages are automatically put into their own directory for compiling/testing by going to the DOS directory that contains these html pages and just typing: SETUP. Then, to compile Example 1 (for instance) you just do a cd example1 and then just type c to compile Example 1 into a standard .GB ROM file. This ROM file is then useable on a GameBoy Emulator or on the real GameBoy hardware with a suitable flash cartridge or other setup.