Target — CP/M (+cpm)

SkillProductivity

z88dk +cpm only: classic vs newlib CP/M, clib/CPU variants (8080/8085/z180), subtypes as packaging (not “newlib”), FCB disk, .com builds. Use when the task is explicitly +cpm / CP/M, not generic targets.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Target — CP/M (+cpm) skill

What this skill tells your AI

The instructions your AI receives, as published by z88dk/z88dk in .agents/skills/target-cpm/SKILL.md and read by ahel’s review.

Configlib/config/cpm.cfg
Treelibsrc/target/cpm/ (classic + newlib share tree; list isolation)
Wikiwiki/platforms/Platform---CPM.md
Helpzcc +cpm -h (authoritative subtype list)

Two worlds (do not mix cores)

ClassicNewlib
Selectdefault / -clib=default / 8080 / 8085 / z180 / ixiy / ansi-clib=new / sdcc_ix / sdcc_iy
CRTlib/target/cpm/classic/cpm_crt0libsrc/target/cpm/cpm_crt.asm.m4
Lib-lcpm_clib, -lcpm8085_clib, …-lcpm + sccz80/sdcc_ix clibs
Headersinclude/include/_DEVELOPMENT/common/
Diskclassic FCB fcntlnewlib FCB (asm_target_open_*); FatFs separate optional stack
CPUsmulti (Z80, 8080, 8085, Z180, …)Z80-class only

Hard rule: one open owner per binary. Do not link classic fcntl with newlib cpm_01_file. See libsrc/target/cpm/README-mixed-tree.md.

Subtypes

  • Mostly disc / packaging (-Cz+cpmdisk, .com), not “newlib selector”.
  • Default subtype → .com-style (-Cz+newext … .com).
  • Some subtypes force CPU/clib (e.g. 8080 machines, bondwell2 → ixiy). Read the subtype line in cpm.cfg.
  • Suites: prefer default subtype only unless a specific machine is in scope (library-newlib / methodology-measure).

Recipes

zcc +cpm -vn hi.c -o hi -create-app              # classic Z80 → .com
zcc +cpm -clib=8085 -vn hi.c -o hi -create-app
zcc +cpm -clib=new -vn hi.c -o hi
zcc +cpm -clib=sdcc_iy -vn hi.c -o hi -create-app
zcc +cpm -clib=8085 --math32 …                   # math32_8085 via ZCC_LIBCPU

Agent checklist

  1. Confirm classic vs newlib before editing CRT/stdio/fcntl.
  2. 8085 CP/M is classic — no newlib product.
  3. Do not fan out 100+ subtypes in tests.
  4. Related skills: library-classic, library-newlib, cpu-8085, tool-appmake.

Signals

GitHub stars
1k
Forks
206
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
target-cpm
Source
github.com/z88dk/z88dk