scene.org File Archive

File download

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

File size:
101 355 bytes (98.98K)
File date:
2022-12-30 11:32:13
Download count:
all-time: 3

Preview

  • file_id.diz 980B
  • result-nexys.png 1.93K
  • result.png 2.09K
  • source.png 94.64K
  • star-52.asm 2.25K
  • star-52.prg 70B

file_id.diz

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)