compiler-80cc

Guides compilation and benchmarking with the z88dk 80cc alternate C compiler.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working with z88dk's experimental 80cc C compiler involves non-obvious flags, CPU-specific codegen rules, and benchmark pitfalls that differ from sccz80 and sdcc. This Skill captures the operational knowledge needed to select, build, and validate 80cc output correctly. ## Core Features & Use Cases - Compiler selection and flags: Documents how to invoke 80cc via zcc -compiler=80cc or -compiler=multi, plus CPU targeting flags like -mz80, -m8085, and -mkc160. - Frame pointer guidance: Explains when -fframe-pointer helps Z80 integer benchmarks and why it hurts math32 TIMER runs. - Benchmark and correctness recipes: Provides TIMER, Dhrystone, sorting, and Mandelbrot verification procedures, including known limitations like missing 8085 qsort support. - Use Case: You are running z88dk classic benchmarks with 80cc on a Z80 target and need to know whether to enable the frame pointer and how to verify the Mandelbrot image output against the golden reference. ## Quick Start Ask the agent to compile a C benchmark with zcc using -compiler=80cc and advise on the correct frame pointer and TIMER flags for your target CPU.

Frequently Asked Questions about compiler-80cc

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

FAQPage Schema
How do I select the 80cc compiler in z88dk?

Select 80cc by passing -compiler=80cc on the zcc command line when the target allows it. The -compiler=multi option also runs 80cc, always compiling 80cc-sp and compiling 80cc-fp when the CPU is treated as having IX.

When should I use -fframe-pointer with 80cc on Z80?

Use -fframe-pointer on Z80 80cc TIMER and PRINTF recipes, including --math-mbf32, since integer benchmarks like sieve and fannkuch are usually smaller and faster with it. math32 TIMER is typically slower and larger with it, and 8085 targets must never receive the flag because 8085 has no IX register.

What is the difference between 80cc and sccz80 in z88dk?

80cc is an alternate small-C style compiler used for A/B codegen comparison against sccz80 and some float benchmarks, not a full day-to-day replacement for sccz80 or zsdcc. You should not assume sccz80 or sdcc runtime helpers match 80cc output.

Does 80cc support the 8085 CPU target?

Yes, 80cc supports 8085 via the -m8085 flag, but with constraints: never pass -fframe-pointer since 8085 lacks the IX register, and qsort does not link on 80cc 8085 builds, so 8085 sorting benchmark rows should not be invented.

How do I rebuild the 80cc compiler from source?

Rebuild from the z88dk root with make -C src/80cc PREFIX=$(pwd) followed by make -C src/80cc PREFIX=$(pwd) install. The --version banner can be stale after rebuild, so verify a change with strings bin/z88dk-80cc instead of trusting the banner.

Why does the 80cc Mandelbrot benchmark image differ from the golden reference?

A single edge pixel difference is acceptable due to float behavior, but many differing last-bytes-of-row (around 15) indicate a missing variable-count byte shift fix from PR #3066. Verify with z88dk-ticks output extraction and compare against z88dk-classic/image-golden.bin.