Compilers: Difference between revisions
From SpecNext Wiki
references proper level |
→C: z88dk improvements |
||
| Line 10: | Line 10: | ||
== C == | == C == | ||
=== '' | |||
: | === ''z88dk-scc80'' and ''z88dk-zsdcc'' === | ||
: " | : Via the "zcc", the [https://github.com/z88dk/z88dk Z88dk] toolchain's front end, two compilers could be invoked: | ||
: "zsdcc" | : "z88dk-scc80", a small C derived C compiler that is nearly C90 compliant with a few notable exceptions. Emphasis is on small code. | ||
: "z88dk-zsdcc", a fork of [[#SDCC]]. | |||
: A Next target is present and under development. Output file types include tap, sna, and esxdos dot commands. | : A Next target is present and under development. Output file types include tap, sna, and esxdos dot commands. | ||
: [[Calling convention notes]] | : [[Calling convention notes]] | ||
Revision as of 15:21, 21 February 2026
BASIC
ZX Basic
- A Basic to Z80 compiler with extensions added to Sinclair Basic.
NextBuild v7
- NextBuild is a suite of tools for Windows which uses Boriel's ZX Basic Compiler. It comes with a Next library of routines to take advantage of the Nexts hardware. Examples included.
- See NextBuild dedicated Wiki section.
C
z88dk-scc80 and z88dk-zsdcc
- Via the "zcc", the Z88dk toolchain's front end, two compilers could be invoked:
- "z88dk-scc80", a small C derived C compiler that is nearly C90 compliant with a few notable exceptions. Emphasis is on small code.
- "z88dk-zsdcc", a fork of #SDCC.
- A Next target is present and under development. Output file types include tap, sna, and esxdos dot commands.
- Calling convention notes
SDCC
- Small Device C Compiler, SDCC is an open-source retargettable, optimizing Standard C (ANSI C89, ISO C99, ISO C11, ISO C23) compiler suite that targets a lot of mostly 8-bit microprocessors [1] including a Z80N target.
- The compiler, assembler and linker are GNU GPL [2] licensed and the compiler's libraries are GNU GPL licensed with a special exception.
- Developed as separate projects there are: a development kit for SDCC for creating small NextZXOS DOT programs and a library for CP/M 3
C-like
ZNC Native compiler
- ZNC is a language and compiler for the ZX Spectrum Next. The language is closely modeled after the C programming language.
- The language suite includes the compiler, an optimizer, assembler and text editor to support native development on the Next. It also include a frontend that makes managing source files and building your projects easier.
Forth
VForth Next
- VForth Next] is a Z80N Forth system suitable to run on the ZX Spectrum Next
Pascal
Pasta80
- Pasta80 is a Turbo Pascal 3.0-compatible compiler that generates machine code for classic and modern Z80 machines (currently ZX Spectrum 48K/128K/Next and CP/M).
- GNU GPL 3 license with a linking exception.
Utilities
bas2tap CLI
- The utility to convert `BASIC in an ASCII file' to a TAP tape image file (can be loaded by emulator or Next as regular BASIC program).
- Comes complete with portable C source. With full BASIC syntax checking!
- (does not support NextBASIC extensions)
- (for NextBASIC you can use the NextZXOS dot commands .txt2bas and .bas2txt directly on the Next)
txt2bas & bas2txt CLI
- Cross platform command line tool to convert NextBASIC to +3dos .bas file and convert .bas files to plain text.
- The tool also includes verbose validation, tap and 3dos, BANK compatible and headerless export and import support
References
- ↑ SDCC targets as of February 2026: the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.), Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola) HC08 based (hc08, s08), Zilog Z80 based MCUs (Z80, Z80N, Z180, SM83, Rabbit 2000, 2000A, 3000A, SM83, TLCS-90, eZ80, R800), Padauk (pdk14, pdk15), STMicroelectronics STM8, MOS 6502 and WDC 65C02. Work is in progress on supporting the Rabbit 4000, 5000, 6000, Padauk pdk13 and the f8 and f8l targets; Microchip PIC16 and PIC18 targets are unmaintained. SDCC can be retargeted for other microprocessors.
- ↑ GNU GPL 2 , GNU GPL 3