scene.org File Archive

File download

<root>­/­parties­/­2022­/­vccc22­/­christmas_star_challenge/stevef_bbc_6502_vc3-2022.zip

File size:
171 017 bytes (167.01K)
File date:
2022-12-30 11:32:14
Download count:
all-time: 6

Preview

  • stevef_bbc_6502_vc3-2022-source.png 162.99K
  • stevef_bbc_6502_vc3-2022.asm 3.45K
  • stevef_bbc_6502_vc3-2022.dat 63B
  • stevef_bbc_6502_vc3-2022.diz 1.88K
  • stevef_bbc_6502_vc3-2022.png 8.27K
  • stevef_bbc_6502_vc3-2022.sh 491B
  • stevef_bbc_6502_vc3-2022.ssd 768B

file_id.diz

SteveF's VC^3 2022 entry, release 1 :-)

Author: SteveF
Category: Christmas Challenge
System:   Acorn BBC B/B+/Master/Electron
Language: 6502 assembler (beebasm format source)
Len source code: 3535 bytes
Len exe file:    63 bytes
Len code only:   63 bytes

Instructions:
stevef_bbc_6502_vc3-2022.ssd is an Acorn DFS disc image suitable for use with
any BBC Micro emulator. The easiest way to run this is with the web-based
"jsbeeb" emulator at https://bbc.godbolt.org/. Choose "Discs"->"From examples
or local", "Browse..." and select stevef_bbc_6502_vc3-2022.ssd. You can then
type "*STAR" at the BASIC ">" prompt and press Return/Enter to run the program.
You may find it easier to type the "*" character if you click on "BBC B with
DFS 1.2" and change "Keyboard layout" to "Natural".

The stevef_bbc_6502_vc3-2022.ssd disc image contains just the runnable file
which is provided separately in the zip file as stevef_bbc_6502_vc3-2022.dat.

stevef_bbc_6502_vc3-2022.asm is the source code, in beebasm
(https://github.com/stardot/beebasm) format.

stevef_bbc_6502_vc3-2022.sh is a simple bash script which creates
stevef_bbc_6502_vc3-2022.dat, stevef_bbc_6502_vc3-2022.ssd and
stevef_bbc_6502_vc3-2022.zip.

Description:
The star is run-length compressed as a series of alternate " " and "*" runs,
relying on the cursor wrapping at the right margin to avoid the need to encode
newlines. Vertical symmetry is used to reduce the length of the run-length
data; I couldn't find any way to shorten the program using the horizontal
symmetry. The code runs in zero page to save a few bytes by allowing the use of
zero page instead of absolute addressing. Overly detailed comments are provided
in the source code.

Comments:
The program doesn't assume the system is already in a 40 column text mode when
it's executed. It would be 10 bytes shorter if it did, and we'd almost always
get away with it in practice.

Merry Christmas!