Target — ZX Spectrum Next (+zxn)

SkillProductivity

z88dk +zxn only: ZX Spectrum Next. Default -mz80n and newlib sdcc_iy, classic via -clib=classic, NEX/DOT packaging, nextreg/copper via cpu-z80n. Use when the task is explicitly +zxn / Next, not +zx.

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 — ZX Spectrum Next (+zxn) skill

What this skill tells your AI

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

Configlib/config/zxn.cfg
Treeslibsrc/target/zxn/, libsrc/newlib/target/zxn/, examples/zxn/
Headersinclude/arch/zxn.h (nextreg, copper, MMU, …)
Wikiwiki/platforms/Platform---ZX-Spectrum-Next-zxn.md
CPU skillcpu-z80n (Next opcodes, nextreg, copper)
Helpzcc +zxn -h

Not 48/128 (+zx)

Bare +zxn is Next. Do not use zx_clib, +zx subtypes, or Spectrum-only recipes.

Defaults (critical)

OptionDefault in zxn.cfg
CPU-mz80n
CLIBsdcc_iy (newlib + reserve IY)
SUBTYPEdefault → appmake +zxn
Defines__ZXNEXT, __Z80N, …

So bare zcc +zxn … is newlib, not classic.

CLIB map

CLIBWorldNotes
classicclassicname is classic, not default; -lzxn_clib -lndos; z80n_crt0
newnewlibsccz80
sdcc_ix / sdcc_iynewlibboth use lib/clibs/sdcc_ix products; IY reserved on sdcc_iy

Subtypes

SubtypeRole
default / zxn / tapNext packaging (+zxn)
bin--bin
sna / snxsnapshots
nex.nex for NextOS / emulators
dot / dotxesxDOS DOT
dot-n / dotx-n / dotn / dotn-nDOT/DOTN + NextOS defines

Classic disk often needs -lesxdos (default classic still has ndos stubs).

Recipes

zcc +zxn -vn hi.c -o hi -create-app                    # newlib sdcc_iy
zcc +zxn -clib=classic -subtype=nex -create-app …
zcc +zxn -clib=new -subtype=nex -create-app …
zcc +zxn -subtype=dot -create-app …

Hardware-facing code

NeedWhere
Next opcodes (mul de, nextreg, …)cpu-z80n, assemble -mz80n
NextReg / MMU / copper symbolsinclude/arch/zxn.h, config_zxn.h
Copper program modelcpu-z80n § Copper + https://wiki.specnext.dev/Copper

Agent notes

  1. Always -mz80n for Next-only opcodes (already in OPTIONS).
  2. Float A/B on Next: math32_z80n when measuring HW mul.
  3. Related: cpu-z80n, library-newlib, tool-appmake.

Signals

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