Vintage Computing Christmas Challenge 2024 (VC³ 2024) - Finalized
Posted: Thu Dec 26, 2024 4:04 pm
This year I participated in VC3, a Christmas challenge contest, preferably for vintage computers.
https://logiker.com/Vintage-Computing-C ... lenge-2024
Was interesting: making the most smaller program. My version was presented in standard QL SuperBASIC.
The result:
With QL I have obtained a file of 87 bytes, although an 88 bytes file was submitted in case it was not accepted without a line number:
My 95 bytes version was reduced with Javu61's idea of using MOD to display a PRINT or another. The previous version was:
The code has some tricks, for example the line number can be placed or not, and it can be attached to the first instruction, since SuperBASIC will load it and take care of reading it correctly.
The comma (,) acts as a tabulator together with the PRINT, thus including 8 spaces.
In the FOR, the 0 in the case above, and the 1 in the case below, can be attached to the TO that indicates the range of values.
The FOR supports values separated by commas as well as ranges, as in FOR i=1,10,19.
The PRINT can be attached to the quotation marks. A curious case is the ELSEPRINT, which SuperBASIC reads and separates without problem (this does not work with the Minerva ROM)
And yes, both the IF and the FOR can be placed on the same line without closing, that is, they do not need END IF or END FOR, in the case of the IF it does not even need THEN.
You have already seen the result, and now you know a little more about the power of pure SuperBASIC.
Both programs can be loaded with LOAD. The one without a line number will be executed immediately. The second one requires RUN. Both can also be loaded and executed directly with LRUN.
Download:
https://logiker.com/Vintage-Computing-C ... lenge-2024
Was interesting: making the most smaller program. My version was presented in standard QL SuperBASIC.
The result:
With QL I have obtained a file of 87 bytes, although an 88 bytes file was submitted in case it was not accepted without a line number:
Code: Select all
PRINT,"\O/":FOR i=0TO 18:IF i MOD 9:PRINT"!"," !"," !":ELSEPRINT"+--------+--------+"
Code: Select all
1PRINT,"\O/":FOR i=1TO 18:PRINT"!"," !"," !"
2FOR i=1,10,19:AT i,0:PRINT"+--------+--------+"
The comma (,) acts as a tabulator together with the PRINT, thus including 8 spaces.
In the FOR, the 0 in the case above, and the 1 in the case below, can be attached to the TO that indicates the range of values.
The FOR supports values separated by commas as well as ranges, as in FOR i=1,10,19.
The PRINT can be attached to the quotation marks. A curious case is the ELSEPRINT, which SuperBASIC reads and separates without problem (this does not work with the Minerva ROM)
And yes, both the IF and the FOR can be placed on the same line without closing, that is, they do not need END IF or END FOR, in the case of the IF it does not even need THEN.
You have already seen the result, and now you know a little more about the power of pure SuperBASIC.
Both programs can be loaded with LOAD. The one without a line number will be executed immediately. The second one requires RUN. Both can also be loaded and executed directly with LRUN.
Download: