target-zxn

Configures z88dk compilation recipes for ZX Spectrum Next targets with NEX and DOT packaging.

1.1k|206|Updated Mar 16, 2016
One-click install
npx skills add https://github.com/z88dk/z88dk --skill target-zxn-z88dk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: target-zxn
Source: https://github.com/z88dk/z88dk/tree/main/.agents/skills/target-zxn
Command: npx skills add https://github.com/z88dk/z88dk --skill target-zxn-z88dk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building software for the ZX Spectrum Next with z88dk requires knowing the correct compiler flags, C library selection, CPU mode, and output packaging options, and using the wrong combination produces binaries that fail on real Next hardware or emulators. ## Core Features & Use Cases - Correct Defaults: Documents that bare zcc +zxn uses -mz80n CPU mode with the newlib sdcc_iy library, preventing confusion with classic Spectrum (+zx) builds. - CLIB and Subtype Mapping: Maps classic, new, sdcc_ix, and sdcc_iy library choices and nex, dot, sna, snx, and bin output subtypes to working command lines. - Hardware Access Guidance: Points to include/arch/zxn.h for NextReg, MMU, and copper symbols and links to the cpu-z80n skill for Next-specific opcodes. - Use Case: Compile a C program into a .nex file for NextOS by running zcc +zxn -clib=classic -subtype=nex -create-app, or produce an esxDOS DOT command with -subtype=dot. ## Quick Start Ask the assistant to compile a C source file for the ZX Spectrum Next as a NEX file using z88dk with the +zxn target and the classic library.

Frequently Asked Questions about target-zxn

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compile a C program for ZX Spectrum Next with z88dk?

Run `zcc +zxn yourfile.c -o out -create-app` to build with the default newlib sdcc_iy library and -mz80n CPU mode. Add `-subtype=nex` to produce a .nex file for NextOS or emulators.

What is the difference between +zx and +zxn targets in z88dk?

The +zxn target builds for the ZX Spectrum Next with -mz80n CPU mode and Next hardware support, while +zx targets the classic 48/128K Spectrum. Do not mix zx_clib or +zx subtypes into +zxn builds.

Which C library should I use for ZX Spectrum Next development?

Bare +zxn defaults to newlib sdcc_iy, which reserves the IY register. Use `-clib=classic` for the classic library with zxn_clib and ndos, or `-clib=new` for newlib with the sccz80 compiler.

How do I create a DOT command for esxDOS on the Spectrum Next?

Compile with `zcc +zxn -subtype=dot -create-app` to produce an esxDOS DOT command. Classic library disk builds often also need `-lesxdos` since the default classic configuration only includes ndos stubs.

How do I access NextReg, MMU, and copper hardware from z88dk code?

Include `include/arch/zxn.h` and `config_zxn.h` for NextReg, MMU, and copper symbol definitions. Assemble with -mz80n to enable Next-specific opcodes like nextreg and mul de, as covered by the cpu-z80n skill.