ZXmas Star A

Author: neon/darklite
Category: Christmas Challenge
System:   ZX Spectrum
Language: Assembler (SDCC)
Len source code: 360
Len tap file:    134
Len code only:   40

Instructions:

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

Description:

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

   |(|y|-|x|| < 5 and (|x| < 5 or |y| < 5)

Since x and y are used as loop iterators and counts down to zero, the
value 10 is subtracted from both to place the star inside the screen.

The program must start at an address ending with 0x20.

See the commented source code for a more detailed description.

Comments:

The tap file contains an unoptimized but pretty standard BASIC
launcher. If you just want to look at the compiled program, see the
bin file.

The star can be centered at the expense of 1 byte.

The assembler from SDCC is used to assemble the file, but I use my own
linker so you probably have to change the source to make it work.