scene.org File Archive

File download

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

File size:
7 563 bytes (7.39K)
File date:
2022-12-30 11:32:13
Download count:
all-time: 19

Preview

  • neon-zxmas_star_b/ dir
  • neon-zxmas_star_b/file_id.diz 1.18K
  • neon-zxmas_star_b/result.png 7.08K
  • neon-zxmas_star_b/source.png 7.37K
  • neon-zxmas_star_b/zxmas_star_b.bas 151B
  • neon-zxmas_star_b/zxmas_star_b.tap 102B

file_id.diz

ZXmas Star B

Author: neon/darklite
Category: Christmas Challenge
System:   ZX Spectrum
Language: BASIC
Len source code: 151
Len tap file:    102
Len code only:   77

Instructions:

Load the tap file in Fuse or any other ZX Spectrum emulator.

Description:

This program iterates over 32x20 characters and determines if each
character is inside or outside the star using this formula:

    |(|x|-|y|)| > 4 or (|x| > 4 and |y| > 4)

The range of x is -15 to 16 and the range of y is -9 to 12, making the
star somewhat centered on the screen.

Constant numbers in BASIC on the ZX Spectrum are normally stored as a
string, a marker byte and a 40 bit binary representation. This uses a
lot of bytes, so to reduce the size some tricks have been used.

Comments:

It is not possible to type in this program since it uses unprintable
characters.

The source size is not really relevant since each keyword is one
keypress when coding on the Spectrum.

The tap file is a tape image with a file system, so it contains things
like the filename and size.

The length of the code is the length of only the program file. This is
the code that is loaded and executed by the interpreter. It includes
line number and line length.