I wanted to show the utility of the RST 7 self-relocator in writing ML loaders. As part of its operation, Ken's Christmas card loads a small ML program into ALTLCD. The program it loads is "# escaped." Any character that is 35 (#) or less is escaped with a #. If it's above that, it's left as-is. If it's = or below and you see a #, you discard the # and take the next character, subtract 35, and use that as the value. In this way the ALTLCD program can be mostly represented in M100 characters rather than hex which takes a lot of space and more time to decode.
It does this decoding in BASIC and shows a progress bar while it does it, since it takes a while. I modified Ken's Christmas Card program to include a small subroutine leveraging the RST 7 relative jumps, so it does the decode of each data string in ML instead of BASIC. It now loads without any detectable delay! This technique can be used to speed up hex based loaders as well. -- John.
WCCARS.BA
Description: Binary data