scene.org File Archive

File download

<root>­/­parties­/­2024­/­vccc24­/­christmas_challenge/jghb_any_bbcbasic_94b_vc3-2024.zip

File size:
14 917 bytes (14.57K)
File date:
2024-12-29 14:13:04
Download count:
all-time: 0

Preview

  • XMAS2024/ dir
  • XMAS2024/fileidb.txt 1.16K
  • XMAS2024/XMAS2024b 94B
  • XMAS2024/xmas2024b-lst.gif 6.56K
  • XMAS2024/xmas2024b.gif 6.56K

file_id.diz

Author:            Jonathan Harston
Category:          Christmas Challenge
System:            Any system that can run BBC BASIC
Language:          BBC BASIC
Source length:     94 bytes
File length:       94 bytes
Executable length: 94 bytes

Instructions:
On any system that can run BBC BASIC, CHAIN "xmas2024a".

Description:
Changes MODE to a 1x1 display, and centres the display. Simple enough
to be a one-line program. The image shows the program running on a
BBC B.

The code leverages the STRING$() function to make multiple copies
of the strings needed to be displayed. Each half of the parcel is
created with STRING$(), and then each half is then doubled with
STRING$() to create the whole line. The final character has to be
output manually.

Each line is generated from a loop from 0 to 5, with even lines
outputting a single 'string', and odd lines outputting eight lines
of 'wrapping paper'. The AND to determine odd/even is written
backwards to stop the tokeniser running the variable into the AND.
The only difference from the 'version A' program is the initial
switch to MODE 4 to clear the screen and select "square" characters,
and outputting padding to centre the display.