My Computer World







  

Developer Nation

New Global Survey for Developers!

What are your experiences with popular developer tools and platforms?


  
ZX BASIC



When you received your ZX Spectrum you probably only saw it as a games machine, which for many it was. Once you start to think about what if you could create a game on your ZX Spectrum. For me this really started my love for programming. Started out writing the "hello world" programme which simply printed your name on screen in a loop. Soon my mind turned to "how do I do XYZ". At the time the only reference I had was the BASIC Manual and some magazines, but I turned to looking at the games I had and see if I can look at the code. Most of them were in machine code so that was no good, some had some protection to prevent you from seeing the listings. I remember looking at Football Manager and started to dabble in subroutines and even the DEF FN functions.

The big problem with BASIC was it was very slow, so any graphic games were out of the question. I also dabbled in Z80 but things for me changed and I was not able to carry on with the Z80.

I did write some games, mostly text adventure games and a strategy game.

Fast forward to the 2020 (COVID19 Year!) and this is where I found ZX Boriel BASIC.

Simply put, you can take your basic listings and compile them into machine code! With some other tools you can then build a TAP file, which can then be loaded via emulators and even saved onto tape (I have not done that yet).


About the ZX BASIC Project from Boriel (ZX Boriel BASIC).

"ZX BASIC is a BASIC ''cross compiler''. It will compile BASIC programs (in your PC) for your ZX Spectrum. ZX BASIC is an SDK entirely written in python. The SDK is implemented using the PLY (Python Lex/Yacc) compiler tool. It translates BASIC to Z80 assembler code, so it is easily portable to other Z80 platforms (Amstrad, MSX). Other non Z80 targets could also be available in the future.

ZX BASIC syntax tries to maintain compatibility as much as possible with Sinclair BASIC, it also have many new features, mostly taken from FreeBASIC dialect."

For more about ZX Boriel BASIC head over to https://zxbasic.readthedocs.io/en/latest

You can see an example of what can be written using ZX Boriel BASIC in the downloads section under Secret Garden.


  

Copyright © 2024 MyComputerWorld.co.uk

My Computer World
Retro Gaming in a modern world.