GBDK libraries documentation

Chapter 2. The Gameboy as a Target

Table of Contents
8 bits + 6 registers + C = tricky
Size of variables
Avoiding Promotion
Using global variables

8 bits + 6 registers + C = tricky

The Gameboy is not an ideal target for C code due to a combination of being eight bit, having a small register set (pity those who have the 6502 as a target...), no indexed addressing mode and no hardware multiplication or division. The processor being eight bit is the biggest limitation as most modern C assumes that an int is at least 16 bits - see later.

This section is on the methods used to get around or avoid the limitations of the processor which boils down to ways of staying within eight bits.

Using Makefiles Size of variables