Skip to main content

uplm80 - PL/M-80 Compiler

PyPI version Tests Pylint License: GPL v3

A modern PL/M-80 compiler targeting Zilog Z80 assembly language.

PL/M-80 was the primary systems programming language for CP/M and other 8080/Z80 operating systems. This compiler can rebuild original CP/M utilities from their PL/M source code.

Repository: https://github.com/avwohl/uplm80

Features

  • Full PL/M-80 language support
  • Targets Z80 instruction
  • Multi-file compilation with cross-module optimization
  • Multiple optimization passes (AST optimizer, upeepz80 peephole optimizer)
  • Generates relocatable object files compatible with standard CP/M linkers
  • Calls procedures the way Intel's PL/M-80 does, so its code links with assembly and objects written for PL/M-80
  • Produces code competitive with the original Digital Research compiler

Code Quality

Compiled output is comparable to the original Digital Research PL/M-80 compiler:

Program DR PL/M-80 uplm80 Difference
PIP.COM 7424 bytes 7127 bytes -4.0%

Installation

pip install uplm80 um80 upeepz80

From source: git clone https://github.com/avwohl/uplm80.git && cd uplm80 && pip install -e . See INSTALL.md and README_RASPBERRY_PI.md for more.

Usage

uplm80 input.plm -o output.mac                  # compile (or: python -m uplm80.compiler)
uplm80 main.plm helper.plm lib.plm -o out.mac   # multi-file, cross-module optimization
um80 output.mac                                 # assemble to .rel
um80 x0100.asm                                  # MON1 equ 5 and the rest
ul80 -o program.com output.rel x0100.rel        # link to CP/M .com

Options:

  • -m cpm|bare|mpm - runtime mode (default cpm); bare rebuilds DRI's utilities, mpm makes MP/M II .PRL/.RSP/.SPR modules
  • -O 0|1|2|3 - optimization level (default 2)
  • -D SYMBOL - define a conditional compilation symbol (repeatable)

Each module carries the runtime routines it uses; link with it only what defines its EXTERNALs. See examples/hellocpm.plm and the drop-in docs/example.Makefile (contributed by Martin Homuth-Rosemann, @Ho-Ro).

Documentation

The front end is generated from plox grammars; peephole optimization is upeepz80.

License

GPL v3.0 or later - see LICENSE. Issues and pull requests are welcome.

  • 80un - Unpacker for the CP/M archive and compression formats LBR, ARC, squeeze, crunch, and CrLZH.
  • cpmdroid - Z80/CP/M emulator for Android phones and tablets. It emulates the RomWBW HBIOS interface and a VT100 terminal.
  • cpmemu - Z80/CP/M emulator for Linux and Windows, with Z80 and 8080 CPU cores. It translates the BDOS and BIOS calls of CP/M 2.2 programs to the host file system.
  • ioscpm - Z80/CP/M emulator for iOS and macOS. It emulates the RomWBW HBIOS interface and runs CP/M 2.2 and CP/M 3.
  • learn-ada-z80 - Collection of more than 90 Ada example programs for uada80, the Ada compiler for the Z80 processor and CP/M.
  • mbasic - Python interpreter for MBASIC 5.21, the Microsoft BASIC-80 for CP/M. Two compiler backends compile the programs to CP/M .COM files or to JavaScript.
  • mbasic2025 - Reconstruction of the lost source code of MBASIC 5.21, the Microsoft BASIC-80 for CP/M. The MACRO-80 source code assembles to a binary that matches mbasic.com byte for byte.
  • mbasicc - C++17 interpreter for MBASIC 5.21, the Microsoft BASIC-80 for CP/M. It runs on Linux and macOS.
  • mbasicc_web - Web browser interpreter for MBASIC 5.21, the Microsoft BASIC-80 for CP/M. Emscripten compiles the mbasicc interpreter to WebAssembly.
  • mpm2 - Z80 emulator for MP/M II, the multi-user CP/M operating system. Users connect over SSH, and SFTP clients transfer files.
  • romwbw_emu - Hardware-level Z80/CP/M emulator for Linux and macOS. It emulates the RomWBW HBIOS interface and switches banks in 512 KB of ROM and 512 KB of RAM.
  • scelbal - Floating-point BASIC interpreter for the 8080 processor and CP/M. A translator converts the original 8008 source code to 8080 source code.
  • uada80 - Ada compiler for the Z80 processor and CP/M 2.2. It compiles a subset of Ada 2012 to CP/M .COM files.
  • uc80 - C compiler for the Z80 processor and CP/M. It optimizes for small code size.
  • ucow - Cowgol compiler for the Z80 processor and CP/M. It runs on Linux in Python.
  • um80_and_friends - Linux toolchain that is compatible with Microsoft MACRO-80. It has an assembler, a linker, a librarian, and a disassembler.
  • upeepz80 - Peephole optimizer for Z80 compilers that write lowercase Z80 assembly language. It shortens jumps to jr, builds djnz loops, and removes dead stores.
  • uplox - LR(1) and GLR parser generator. It writes a lexer DFA, an LR parser, and a typed automatic AST, and uplm80 uses it to parse PL/M-80.
  • z80cpmw - Z80/CP/M emulator for Windows. It emulates the RomWBW HBIOS interface and boots CP/M from disk images.

Metadata

Release files for uplm80 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uplm80 0.5.0
File Size Uploaded Provenance Actions
uplm80-0.5.0.tar.gz 431.3 kB With provenance Details for uplm80-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for uplm80 0.5.0
File Interpreter ABI Platform Actions
uplm80-0.5.0-py3-none-any.whl Python 3 none any Details for uplm80-0.5.0-py3-none-any.whl

Total release size: 716.5 kB

Release files / uplm80-0.5.0.tar.gz

Download URL uplm80-0.5.0.tar.gz
Size 431.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7e1b97472989505ffe7a55f7a8e248109b7f8c5ad46292fd08d5a06ed30b15a2
BLAKE2b-256 checksum
How to use checksums
ddc2d7bd1549d4ca3e6afcecbe80f405eb7ca2c07e642d04ccb38b4c3780dd24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / uplm80-0.5.0-py3-none-any.whl

Download URL uplm80-0.5.0-py3-none-any.whl
Size 285.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf9e27394d0dc5068551b83c8722797bbaf93941814329cd2893d97ae1884024
BLAKE2b-256 checksum
How to use checksums
a6c520cd974b3e492a17cf9be7a4cc08a6783e79d630b4c75c5bfe834241af0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for uplm80 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for uplm80-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page