4.3 The Z80 and gbz80 port

Next: 4.4 The HC08 port Up: 4. Notes on supported Previous: 4.2 DS400 port Contents Index

# 4.3 The Z80 and gbz80 port

SDCC can target both the Zilog Z80 and the Nintendo Gameboy's Z80-like gbz80. The Z80 port is passed through the same regressions tests (see section 7.9) as the MCS51 and DS390 ports, so floating point support, support for long variables and bitfield support is fine. See mailing lists and forums about interrupt routines.

As always, the code is the authoritative reference - see z80/ralloc.c and z80/gen.c. The stack frame is similar to that generated by the IAR Z80 compiler. IX is used as the base pointer, HL and IY are used as a temporary registers, and BC and DE are available for holding variables. Return values for the Z80 port are stored in L (one byte), HL (two bytes), or DEHL (four bytes). The gbz80 port use the same set of registers for the return values, but in a different order of significance: E (one byte), DE (two bytes), or HLDE (four bytes).

Next: 4.4 The HC08 port Up: 4. Notes on supported Previous: 4.2 DS400 port Contents Index