Keywords: sdccman

# 4.3 The Z80, Z180, Rabbit 2000, Rabbit 2000A, Rabbit 3000A, SM83 (GameBoy), eZ80 and TLCS-90 ports

SDCC can target the Z80, Z180, eZ80 in Z80 mode, Rabbit 2000, Rabbit 2000A, Rabbit 3000A and LR35902, the Sharp SM83 (used .e.g in the Nintendo GameBoy) sm83.

When a frame pointer is used, it resides in IX. Register A, B, C, D, E, H, L and IY are used as a temporary registers for holding variables.

When enabling optimizations using --opt-code size and a sufficiently high value for --max-allocs-per-node SDCC typically generates much better code for these architectures than many other compilers. A comparison of compilers for these architecture can be found at `http://sdcc.sourceforge.net/wiki/index.php/Z80_code_size`.

Subsections

- 4.3.1 Startup Code
- 4.3.2 Rabbit ports
  - 4.3.2.1 Rabbit wait states
- 4.3.3 Z80, Z180 and Z80N calling conventions
  - 4.3.3.1 Z80 SDCC calling convention, version 1
  - 4.3.3.2 Z80 SDCC calling convention, version 0
- 4.3.4 Rabbit 2000, Rabbit 2000A, Rabbit 3000A, eZ80 and TLCS-90 calling conventions
  - 4.3.4.1 Rabbit SDCC calling convention, version 1
- 4.3.5 SM83 calling conventions
  - 4.3.5.1 SM83 SDCC calling convention, version 1
  - 4.3.5.2 SM83 SDCC calling convention, version 0
- 4.3.6 Small-C calling convention
- 4.3.7 Complex instructions
- 4.3.8 Unsafe reads
- 4.3.9 Z80 banked calls