Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The Sinclair ZX Spectrum BASIC compiler!

License

NotificationsYou must be signed in to change notification settings

boriel-basic/zxbasic

Boriel ZX Basic

Build Statuslicensepyversions

ZX BASIC

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

All files in this project are covered under theAGPLv3 LICENSEexcept those placed in directorieslibrary/ andlibrary-asm.Those are licensed underMIT license unless otherwisespecified in the files themselves (i.e. a different license). Anyway, all licenses for thefiles 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 torelease the compiler itself as a closed source program.

If you modifythis 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 changesyou 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 theZX BASIC docs.

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

INSTALLATION

Go to theZXBasic download pageand 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 iszxbc.exe (more on this later). With this toolchainalso comeszxbasm.exe (the assembler) andzxbpp.exe (the preprocessor), but theseare not needed when programming in BASIC.

  • For Linux and Mac OSX there is a python version, so you will need a pythoninterpreter (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 arezxbc.py (the compiler),zxbasm.py (the assembler) andzxbpp.py (the preprocessor).You can use this version in Windows, but will need to install a python interpreter first.

Examples
Eleuterio, el mono serioEl HobbitKnight & Demonds DX
An in-game screenshot of Eleuterio by@na_th_anIngame screenshot ofEl Hobbit by@Wilco2009Ingame screenshot ofKnignt and Demonds DX byEinar Saukas

See more examples at theRelased Programs page.

QUICK START

For a quick start, just open a terminal in your PC in the same directory you uncompressed ZX Basicand typezxbc (on Windows) orzxbc.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]           PROGRAMzxbc: error: the following arguments are required: PROGRAM

Create a text file with the following content:

10 CLS20 PRINT "HELLO WORLD!"

Save it ashello.bas and finally compile it with:

zxbc -taB hello.bas

If everything went well, a file namedhello.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 foryour machine. Check and compile the examples included in the examples/ folderor go to thedocumentation page for further info.

ACKNOWLEDGEMENTS

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

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


ko-fi

About

The Sinclair ZX Spectrum BASIC compiler!

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

    Packages

    No packages published

    Languages


    [8]ページ先頭

    ©2009-2025 Movatter.jp