Christmas Present (Commodore C64/6502 Assembler) Author: Geir Straume Category: Christmas Challenge System: C64 Language: Assembler (64tass) Len source code: 2174 bytes (source with comments) Len exe file: 44 bytes Len code only: 42 bytes (excl. load address) Instructions: Start the VICE C64 emulator and drag and drop "present.prg" into the emulator window. Enter SYS 2091 to start. Description: This version was created AFTER the challenge deadline. The code displays the top three ribbon chars by calling the ROM routine 'StrOut'. The program loads at $082a to be able to get the lo byte of the address of the chars by executing an 'sre $002f' instruction (some bytes are used as both code and data.) The hi byte of the address is also used as column number. 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 the initial column counter value and to get and calculate char numbers. A memory location with a known value is used as a row counter. See commented source code for further implementation details.