This documentation is obsolete. For actual documentation go https://c64lib.github.io/.

« Back

mem

This module contains various memory related macros and subroutines that cover following scenarios: copying memory blocks, rotating memory blocks, filling memory blocks with given value.

Usage

The mem module consists of following files:

  • lib/mem-global.asm
  • lib/mem.asm

Additionally, the mem module consists of following subroutines:

  • lib/sub/copy-large-mem-forward.asm
  • lib/sub/fill-mem.asm
  • lib/sub/fill-screen.asm
  • lib/sub/rotate-mem-right.asm

All files located directly in lib directory can be imported to your source code using #import directive, i.e.:

#import "common/lib/mem.asm"

All library files located directly under lib directory has #importonce declared which means they can be safely imported multiple times - only first import is effective.

Library files with -global.asm suffix contains globalized elements that can be directly accessed from root namespace. All names of these elements (except labels) are prefixed with c64lib_ prefix.

All library files located under lib\sub directory are subroutines and should be imported only once (it’s up to the programmer to ensure this) - they are not macros so corresponding assembly code will be embedded right in the place where they are imported.