Christmas Present (Commodore C64/6502 Assembler)
Author: Geir Straume
Category: Christmas Challenge
System: C64
Language: Assembler (64tass)
Len source code: 2182 bytes (source with comments)
Len exe file: 47 bytes
Len code only: 45 bytes (excl. load address)
Instructions:
Start the VICE C64 emulator and drag and drop "present.prg" into the emulator window. Enter SYS 2308 to start.
Description:
The code displays the top three ribbon chars by calling the ROM routine 'StrOut'. The program loads at $0900
to be able to use the hi byte of the address of the ribbon chars as column number too.
The main part of the present is displayed by writing 19 rows of 19 chars to the screen. Two zero page variables
and the carry flag are used to get 9-bit values which are rotated to determine every 9th row and column.
Some bytes in ROM are used to get or calculate char numbers. A memory location with a known value is used as
a row counter.
See commented source code for further implementation details.