All Projects → boriel → Zxbasic

boriel / Zxbasic

Licence: gpl-3.0
The Sinclair ZX Spectrum BASIC compiler!

Programming Languages

python
139335 projects - #7 most used programming language
basic
69 projects

Labels

Projects that are alternatives of or similar to Zxbasic

Pgo
PGo is a source to source compiler to compile PlusCal into Go lang
Stars: ✭ 92 (-8.91%)
Mutual labels:  compiler
Dataformsjs
🌟 DataFormsJS 🌟 A minimal JavaScript Framework and standalone React and Web Components for rapid development of high quality websites and single page applications.
Stars: ✭ 95 (-5.94%)
Mutual labels:  compiler
Bqn
An APL-like programming language. Self-hosted!
Stars: ✭ 100 (-0.99%)
Mutual labels:  compiler
Scheje
A little scheme implementation on top of Clojure
Stars: ✭ 92 (-8.91%)
Mutual labels:  compiler
Ngraph
nGraph has moved to OpenVINO
Stars: ✭ 1,322 (+1208.91%)
Mutual labels:  compiler
Evm2wasm
[ORPHANED] Transcompiles EVM code to eWASM
Stars: ✭ 96 (-4.95%)
Mutual labels:  compiler
Sbcl
Mirror of Steel Bank Common Lisp (SBCL)'s official repository
Stars: ✭ 1,305 (+1192.08%)
Mutual labels:  compiler
Vc4c
Compiler for the VC4CL OpenCL implementation
Stars: ✭ 101 (+0%)
Mutual labels:  compiler
Webpack Core Usage
webpack2完整系列课程,欢迎阅读。同时欢迎移步我的react全家桶文章全集: https://github.com/liangklfangl/react-article-bucket
Stars: ✭ 94 (-6.93%)
Mutual labels:  compiler
Faust
Functional programming language for signal processing and sound synthesis
Stars: ✭ 1,360 (+1246.53%)
Mutual labels:  compiler
Selfie
An educational software system of a tiny self-compiling C compiler, a tiny self-executing RISC-V emulator, and a tiny self-hosting RISC-V hypervisor.
Stars: ✭ 1,318 (+1204.95%)
Mutual labels:  compiler
Pyast64
Compile a subset of the Python AST to x64-64 assembler
Stars: ✭ 93 (-7.92%)
Mutual labels:  compiler
Artist
ARTist's core implementation meant to be included in the art project. Provides ARTist APIs and boilerplate code for modules.
Stars: ✭ 97 (-3.96%)
Mutual labels:  compiler
Wasm Forth
A Forth implementation compiling to WebAssembly.
Stars: ✭ 92 (-8.91%)
Mutual labels:  compiler
Fanx
A portable programming language
Stars: ✭ 101 (+0%)
Mutual labels:  compiler
C To Mips Compiler
C to MIPS Assembly Compiler
Stars: ✭ 91 (-9.9%)
Mutual labels:  compiler
Fetlang
Fetish-themed programming language
Stars: ✭ 1,337 (+1223.76%)
Mutual labels:  compiler
Nanojit
NanoJIT is a small, cross-platform C++ library that emits machine code.
Stars: ✭ 101 (+0%)
Mutual labels:  compiler
Lixincompiler
参考自龙书上的语言,自己实现了一个编译器的前端。
Stars: ✭ 101 (+0%)
Mutual labels:  compiler
Numba Scipy
numba_scipy extends Numba to make it aware of SciPy
Stars: ✭ 98 (-2.97%)
Mutual labels:  compiler

Boriel ZX Basic

Build Status 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 GPLv3 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 of the licenses for files under those directories allow binary closed-source (i.e. commercial) distribution of the files 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 GPLv3) in any way 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 @Wilco2000 Ingame screenshot of Knignt and Demonds DX by Einar Saukas

See more examples at the Relased 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] [--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 -taB 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) of this project.

Thanks to:

  • Andre Adrian [adrianandre AT compuserve.de] from which I ripped the 32 bits Z80 MULT and DIV routines. See: http://www.andreadrian.de/oldcpu/Z80_number_cruncher.html

  • Matthew Wilson [matthew AT mjwilson.demon.co.uk] and Andy [fract AT zx-81.co.uk] from comp.sys.sinclair for their help on ROM FP-CALC usage.

  • Mulder from World Of Spectrum for finding the nasty PRINT AT bug and the GTU8 bug. See: http://www.worldofspectrum.org/forums/showthread.php?p=278416&posted=1#post278416

  • Compiuter from Speccy.org for finding a bug in PRINT OVER 1 routine.

  • Britlion for his HUGE contribution (both in optimizations, ideas and libraries).

  • LCD Author of the BorIDE, which has also made many contributions to the project.

  • There are several more contributions (e.g. Thanks to them for their intensive testing!). And thank you all (the entire community) for your interest!

If you have contributed in some way to this project, please, tell me so I'll add you to this list.


ko-fi

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].