MEGA65 Christmas Star 52
Author: Geir Straume
Category: Christmas Challenge
System: MEGA65
Language: Assembler (ACME)
Len source code: 2306 bytes (lots of comments in the code)
Len exe file: 70 bytes
Len code only: 52 bytes
Instructions:
Install the Xemu emulator (https://github.lgb.hu/xemu/), drag and drop the prg file into it.
Description:
The code displays the star on the screen by drawing four partly overlapping triangles.
The program consists of three loops; TriangleLoop, RowLoop and ColumnLoop. Each triangle consists of 13 rows with up to 13 columns.
The base screen address of one of the triangles was chosen so that the lo byte ($a2) matches the opcode of the first instruction, saving a byte.
See commented source code for further implementation details.
Comments:
- File result.png is a screenshot from the Xemu emulator
- File result-nexys.png is a screenshot from the MEGA65 core running on a Nexys A7 FPGA (screenshot taken via the M65Connect tool)