Skip to main content

Boriel ZX Basic

Build Status license pyversions

ZX BASIC

Copyleft (K) 2008, Jose Rodriguez-Rosa (a.k.a. Boriel) http://www.boriel.com

All files in this project are covered under the AGPLv3 LICENSE except those placed in directories library/ and library-asm. Those are licensed under MIT license unless otherwise specified in the files themselves (i.e. a different license). Anyway, all licenses for the files under those directories allow binary closed-source (i.e. commercial) distribution of the binaries created with this compiler.

You can create closed-source programs (even commercial ones) with this compiler (a mention to this tool will be welcome, though). But you are not allowed to release the compiler itself as a closed source program.

If you modify this project (the compiler .py or anything licensed as AGPLv3) in any and use it as a part of a SaaS service, you MUST publish the changes you made and submit your contribution to the community under the same license.


DOCUMENTATION

This is a very little help file.

  • For DOCUMENTATION in English go to the ZX BASIC docs.

  • For help, support, updates meet the community at the forum.

INSTALLATION

Go to the ZXBasic download page and get the version most suitable for you.

There are, basically, two flavors (both with identical capabilities):

  • For Windows you can download de win32 executable (Windows .exe zip package) version. To install just uncompress it in a directory of your choice. The main executable is zxbc.exe (more on this later). With this toolchain also comes zxbasm.exe (the assembler) and zxbpp.exe (the preprocessor), but these are not needed when programming in BASIC.

  • For Linux and Mac OSX there is a python version, so you will need a python interpreter (available on many platforms, and usually already installed in Linux and Mac OSX). Just uncompress it in a directory of your choice and installation is done. :-) The main executables are zxbc.py (the compiler), zxbasm.py (the assembler) and zxbpp.py (the preprocessor). You can use this version in Windows, but will need to install a python interpreter first.

Examples
Eleuterio, el mono serio El Hobbit Knight & Demonds DX
An in-game screenshot of Eleuterio by @na_th_an Ingame screenshot of El Hobbit by @Wilco2009 Ingame screenshot of Knignt and Demonds DX by Einar Saukas

See more examples at the Released Programs page.

QUICK START

For a quick start, just open a terminal in your PC in the same directory you uncompressed ZX Basic and type zxbc (on Windows) or zxbc.py (OSX, Linux). You should see a zxbasic message like this:

usage: zxbc [-h] [-d] [-O OPTIMIZE] [-o OUTPUT_FILE] [-T] [-t] [-B] [-a] [-A]
           [-S ORG] [-e STDERR] [--array-base ARRAY_BASE]
           [--string-base STRING_BASE] [-Z] [-H HEAP_SIZE]
           [--heap-adddress HEAP_ADDRESS] [--debug-memory]
           [--debug-array] [--strict-bool] [--enable-break] [-E] [--explicit]
           [-D DEFINES] [-M MEMORY_MAP] [-i] [-I INCLUDE_PATH] [--strict]
           [--version]
           PROGRAM
zxbc: error: the following arguments are required: PROGRAM

Create a text file with the following content:

10 CLS
20 PRINT "HELLO WORLD!"

Save it as hello.bas and finally compile it with:

zxbc -f tap --autorun --BASIC hello.bas

If everything went well, a file named hello.tap should be created. Open it with your favourite emulator (i.e. fuse) and see the result.

Congratulations! You're now ready to create compiled BASIC programs for your machine. Check and compile the examples included in the examples/ folder or go to the documentation page for further info.

ACKNOWLEDGEMENTS

These are some people who has contributed in a way or another. I consider some of them co-authors (Britlion, LCD, @em00k, ...) of this project.

Also, many thanks to people supporting this project with their donations!


ko-fi

Metadata

Release files for zxbasic 1.18.7

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

Source distribution (sdist)

Source distribution for zxbasic 1.18.7
File Size Uploaded Provenance Actions
zxbasic-1.18.7.tar.gz 2.7 MB Without provenance Details for zxbasic-1.18.7.tar.gz

Built distribution (wheel)

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

Total release size: 3.7 MB

Release files / zxbasic-1.18.7.tar.gz

Download URL zxbasic-1.18.7.tar.gz
Size 2.7 MB
Tags Source
SHA-256 checksum
How to use checksums
167ad32e629d04fa8efdf3a6f7f003ee14954c8b913d183cd8a71c7d20e1ade4
BLAKE2b-256 checksum
How to use checksums
2e7b08091357ade8c4140b96cfd3591448192c213cad16b9d55b676519eb6f69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.1 Linux/6.8.0-100-generic

Release files / zxbasic-1.18.7-py3-none-any.whl

Download URL zxbasic-1.18.7-py3-none-any.whl
Size 1000.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b2411f53cdbab7456eecbc55eb4a4b99e9af276e3872215277da07d8272b48fe
BLAKE2b-256 checksum
How to use checksums
0070ed4a5d3a285cd4f5d4a32564ea0a816c16de369215fba2e0d578d01807d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.1 Linux/6.8.0-100-generic

Security for zxbasic 1.18.7

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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