pouët.net

Christmas Challenge

vc23

Author: Art-top and UriS
Category: Christmas Challenge
System:   ZX Spectrum
Language: Assembler
Len source code: 823
Len exe file:    105
Len code only:   23
Instructions:

You can use any emulator of your choice. I recommend Unreal (Windows);
in most cases it's enough to drag&drop the vc23c.tap file into emulator's window,
then go to BASIC and type:
LOAD""CODE 58643: CLS: RANDOMIZE USR 58643: PAUSE 0

Or drag&drop the vc23.tap file into emulator's window,
and go to "Type Loader".

Source code in vc23.asm
You can compile it using sjasmplus (for example) from terminal/command promt:
sjasmplus.exe vc23.asm
or
sjasmplus vc23.asm

Description:
External cycles (calculation of coordinates). One of coordinates decreases from the initial value to a value of less than 0. When the value is reached less than 0, the offset is added to coordinate and second coordinate is reduced by 1. When zero reaches, the program stops.
Inner cycle (asterisk output cycle). The program print asterisk, mirrors one of the coordinates and prints asterisk again. This can repeat several times.

vc23.asm - source code
vc23.bin - compiled code
vc23c.tap - compiled code in .tap format
vc23.tap - compiled code an BASIC loader together in .tap format

UriS - algorithm idea
Art-top - code and optimization

Comments:
It was very interesting.