C64 BASIC variable dump program

Usage example:

dump.prg

source code

The program uses CC65 with a custom minimal library, so that it fits in the 4k RAM from $c000 to $cfff. CC65 needs 25 bytes from the zeropage. In the linker definition file I've reserved these bytes from $73, which is the CHRGET function and the previous result of RND. This means the C program can't call kernel functions which needs CHRGET, but the crt0 file backups this zeropage area on start and restores it on exit.

Some wrapper functions for useful BASIC and KERNAL functions are defined in rom-functions.s, with the C prototypes in rom-functions.h.


14. Juni 2013, Frank Buß