Christmas Present (Commodore C128/6502 Assembler)
Author: Geir Straume
Category: Christmas Challenge
System: C128
Language: Assembler (64tass)
Len source code: 1995 bytes (source with comments)
Len exe file: 43 bytes
Len code only: 41 bytes (excl. load address)
Instructions:
Start the VICE C128 emulator and drag and drop "present.prg" into the emulator window. Enter SYS 11552 to start.
Description:
The code displays the top three ribbon chars by calling the ROM routine 'PrImm' (Print Immediate). One instruction
before the actual routine is executed to get a specific accumulator value.
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.
The program loads at $2d20 to be able to get two of the char numbers via known memory locations. Some bytes in ROM
are used to calculate two other char numbers. A memory location with a known value is used as a row counter.
See commented source code for further implementation details.