file_id.diz
christmas basic 1-liner
Author: Siko
Category: Christmas Challenge
System: Amstrad CPC
Language: BASIC
Len source code: 1 line, 253 characters
Len exe file: 256 bytes (1KB on disk)
Instructions:
Use any Amstrad CPC emulator : cpc-ec, wincpc, or even online emulator:
https://floooh.github.io/tiny8bit/cpc-ui.html
then drag and drop the dsk file and type
run"vc3 <enter>
Description:
Draws the stars line by line, using locate/print commands, in 9 steps, taking advantage of symmetries
On CPC, basic lines are limited to 256 bytes, this one liner uses almost 256 bytes:
1 MODE 1:FOR y=5 to 13:READ x,n:i=30-x-n:j=24-y:x=x+11:LOCATE x,y:PRINT STRING$(n,"*"):LOCATE i,y:PRINT STRING$(n,"*"):LOCATE x,j:PRINT STRING$(n,"*"):LOCATE i,j:PRINT STRING$(n,"*"):NEXT:WHILE 1:WEND:DATA 5,1,5,2,5,3,5,4,1,9,2,8,3,6,4,6,5,5:'siko 2022