Compilers: Difference between revisions

From SpecNext Wiki
Jump to: navigation, search
Johnnyo (talk | contribs)
Johnnyo (talk | contribs)
 
(2 intermediate revisions by 2 users not shown)
Line 25: Line 25:


: Developed as separate projects there are: a development kit for SDCC for creating small NextZXOS DOT programs and a [https://github.com/retro-vault/libcpm3-z80 library for CP/M 3]
: Developed as separate projects there are: a development kit for SDCC for creating small NextZXOS DOT programs and a [https://github.com/retro-vault/libcpm3-z80 library for CP/M 3]
: Firmware and loader sources in the tbblue repository were made to be compiled with SDCC.


== C-like ==
== C-like ==
Line 36: Line 38:
=== ''VForth Next'' ===
=== ''VForth Next'' ===


: [https://github.com/mattsteeldue/vforth-next VForth Next]] is a Z80N Forth system suitable to run on the ZX Spectrum Next
: [https://github.com/mattsteeldue/vforth-next VForth Next] is a Z80N Forth system suitable to run on the ZX Spectrum Next


== Pascal ==
== Pascal ==
Line 43: Line 45:
: [https://github.com/pleumann/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).  
: [https://github.com/pleumann/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.
: GNU GPL 3 license with a linking exception.
=== ''OmniPas'' ===
: [https://syntaxerrorsoftware.itch.io/omnipas OmniPas] is a Windows‑based Pascal cross‑compiler that targets multiple platforms, including the ZX Spectrum and ZX Spectrum Next.


== Utilities ==
== Utilities ==

Latest revision as of 17:41, 22 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 [1]:
"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 [2] including a Z80N target.
The compiler, assembler and linker are GNU GPL [3] 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
Firmware and loader sources in the tbblue repository were made to be compiled with SDCC.

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.

OmniPas

OmniPas is a Windows‑based Pascal cross‑compiler that targets multiple platforms, including the ZX Spectrum and ZX Spectrum Next.

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

  1. z88dk wiki
  2. 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.
  3. GNU GPL 2 , GNU GPL 3