scene.org File Archive

File download

<root>­/­parties­/­2022­/­vccc22­/­christmas_star_challenge/siko-cpc-basic-vc3-2022.zip

File size:
40 275 bytes (39.33K)
File date:
2022-12-30 11:32:13
Download count:
all-time: 10

Preview

  • file_id.diz 836B
  • result.jpg 43.07K
  • siko-cpc-basic-vc3-2022.dsk 190.25K
  • source.jpg 64.34K
  • source.txt 256B

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