abacaxi wrote: ↑Sun Mar 23, 2025 3:35 pm
Nice, I'm curious why there's s nop at 4009 before the JP, in beeps template that you also link to it's just a jp. Something with line numbers and length for the following basic I presume? I'm an experienced z80 programmet but I'm new to the zeddy. Trying to learn how the boot/load sequence works. Much easier on the spectrum where you can load the machine code separately to whatever address you like.
The NOP JP MAIN is part of the BASIC-line that is executed.
The 4 bytes together form a fake linenumber and fake length.
A linenumber in BASIC is not allowed to be larger than 9999, The NOP and the JP together form linenumber 195 (MSB first).
The address of the JP is the fake linelength.
After loading the ZX81 will start the BASIC indicated by NXTLIN. That BASIC-line does a PRINT USR number to the code that forms the
linenumber and the JP. Since all code is done over the systemvariables you can;t load the code without autostart and edit on a zx81 itself.
To make a link to the ZX Spectrum:
During the MINIGAMECOMPO's around 2006-2010 the size on tape counted. Also the start of the program.
On a ZX Spectrum a same trick is developed to store info in a fake linenumber and size. When making the shortest loader on a ZX81
I simply tried the same trick on the ZX81.