Uploaded July 2022 | Updated September 2026, 2 weeks ago
In this journal entry I'll further explore the MCODER2 compiler for the ZX81. This time I attempt to compile my version of the Elite game that I wrote as a test program for the ZXSimulator. It's not complete, still missing planet hopping, but the space shootout with pirates has been working for some time, although very slow on a base ZX81/TS1000. Unfortunately, Elite is currently 8K in size and MCODER2 can handle just under 6K for a single compile. The solution is to do a multi-step compile and with Elite I've split it up into the game engine, a little over 5K, and the screen layout, a little over 2K. I'll also demonstrate how the two parts can communicate using peeks and pokes. I'm doing this all on actual hardware to demonstrate that this could have been done back in 1983 when MCODER2 was on the market (well, except I use a PC in place of a cassette recorder to capture the audio of my saves).
Here is the program I wrote to fix the USR call:
200 LET A=20514
210 IF 97=PEEK A AND 203=PEEK (A+1) THEN GOTO 240
220 LET A=A+1
230 GOTO 210
240 PRINT A
#Sinclair #ZX81 #MCODER2 #TS1000 #Elite #BASIC #Compiler
In this journal entry I'll further explore the MCODER2 compiler for the ZX81. This time I attempt to compile my version of the Elite game that I wrote as a test program for the ZXSimulator. It's not complete, still missing planet hopping, but the space shootout with pirates has been working for some time, although very slow on a base ZX81/TS1000. Unfortunately, Elite is currently 8K in size and MCODER2 can handle just under 6K for a single compile. The solution is to do a multi-step compile and with Elite I've split it up into the game engine, a little over 5K, and the screen layout, a little over 2K. I'll also demonstrate how the two parts can communicate using peeks and pokes. I'm doing this all on actual hardware to demonstrate that this could have been done back in 1983 when MCODER2 was on the market (well, except I use a PC in place of a cassette recorder to capture the audio of my saves).
Here is the program I wrote to fix the USR call:
200 LET A=20514
210 IF 97=PEEK A AND 203=PEEK (A+1) THEN GOTO 240
220 LET A=A+1
230 GOTO 210
240 PRINT A
#Sinclair #ZX81 #MCODER2 #TS1000 #Elite #BASIC #Compiler










