07. Clear screen (clrscr) - RetroAsmDev/C64AsmGameJourney GitHub Wiki

Repository: https://github.com/RetroAsmDev/C64AsmGameJourney/tree/master/clrscr

  • Code is split across several assembler files:

    • main.asm: Initialization code, game loop
    • libmemory.asm: Variables, constants, etc.
    • libscreen.asm: Subroutines for manipulation screen
  • Two new subroutines clrscr and clrscr2 were added. The VICE debugger was used for cycles counting - execution of the the first one takes ~12000 cycles, the latter one about ~8000 cycles.

    • Both routines preserve AXY registers and use zero page for storing temporary variables.
    • Routines are not versatile, they expect the screen memory to be at the default location $0400 (%#0001XXXX in $D018).
    • The VIC-II uses bank 0, which is the default one located at $0000-$3FFF (%#XXXXXX11 in $DD00)