3 ms·
Pushing an address and "returning" was the only (sane) way to have an indirect jump on the Z80, so it wasn't even considered a hack. There was also this trick
by praptak 12y ago
Pushing an address and "returning" was the only (sane) way to have an indirect jump on the Z80, so it wasn't even considered a hack.
There was also this trick of using the last byte of RAM as the entry to the interrupt handler, so as to use the "free" array of 0xFF that sat in ROM as the handler table. The last byte was a relative jump because luckily the first byte of ROM was negative in U2, so the handler jumped back into RAM after wrapping around into ROM.
- vhdlGuru 12y agoOh man, you reminded me of LDIR tricks, with loaders (tape loaders!) decoding stuff in tight manually written decoding loops... and with the final decode, overwriting the decoding loop itself. Bam, you're in the game.
- praptak 12y agoI remember these too. The really good loops could shovel bits from audio to memory and do stuff like drawing the loaded image in a fancy way or display the load progress.