Back in the 80s when type-in program magazines were common, in France we had the wonderful "Hebdogiciel" with a perpetually running BASIC programming contest called "deulignes" -- which means "twolines".<p>"Deulignes" programs could target any platform, but must only take 2 lines of BASIC (most implementations allow only a limited line length, often 255 characters).<p>Some programs were really impressive; I remember one complete breakout implementation in MSX-BASIC for instance. People actually made whole (small) games in 2 lines of BASIC!<p>Here's an example page : <a href="https://archive.org/details/hebdogiciel-french-098/page/n15/mode/2up" rel="nofollow noreferrer">https://archive.org/details/hebdogiciel-french-098/page/n15/...</a>
If you enjoy this, then you should definitely checkout 8-Bit Show And Tell’s YouTube channel. The presenter, Robin, regularly does deep dives into code optimisation and fixes on Commodore 64 and other machines.<p><a href="https://www.youtube.com/watch?v=jhQgHW2VI0o">https://www.youtube.com/watch?v=jhQgHW2VI0o</a>
<a href="https://gkanold.wixsite.com/homeputerium/games-list-2023" rel="nofollow noreferrer">https://gkanold.wixsite.com/homeputerium/games-list-2023</a> Games written in ten lines of vintage BASIC. (Not related to the article but its title.)
BASIC defaults to the tape device if you leave off the device number in LOAD/SAVE commands. So you can save another byte or two by saving to tape instead.
In a C64 BASIC program keywords like SAVE and PRINT can be abbreviated:<p><a href="https://www.c64-wiki.com/wiki/BASIC_keyword_abbreviation" rel="nofollow noreferrer">https://www.c64-wiki.com/wiki/BASIC_keyword_abbreviation</a><p>That would shave off some more precious bytes!
I don't know anything about C64 or C64 BASIC, but would it be possible to intentionally write a shorter binary which will break the interpreter and do what we want instead? For example jump directly to a middle of the kernel ROM routine (akin to ROP in the modern days), or use a bad address in the "next line" offset etc.