1K coding technic, 37 programmable bytes found

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
dr beep
Posts: 2084
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

1K coding technic, 37 programmable bytes found

Post by dr beep »

While coding my pinball game I was wondering how much of the systemvariables can be used as code without disturbing the program.

So I coded a routine to make a lowresdisplay of the current address changed and a highresroutine to display the addresses from 16384 and further.
After a keypress the next address would be set with a value. While display would stay ok the address was programmable.

The first 37 bytes from 16384 to 16420 (just before LASTK) is a block of bytes that can be coded AFTER loading software.
I can use the defined screen of the program for as a storage and move routine of the software that can run on that part of the memory (ie the LBUF routine and some data). After moving the code the screen can be used for its designed use, namely the display of the program. The onetime used routine will be overwritten by the gameplay (like I already did with the BASIC-loader).

So now I can use the BASIC-loader on the screen to jump to #4009 to set IX and a jump to further initialisation and then jump from the screen to the actual game that uses more often used code.

After LASTK there are more bytes that be used (between LASTK and FRAMES), but that are just a few bytes. This is a 1 block part that can be easily used in coding.
Post Reply