Commodore 64 binary executable

From Just Solve the File Format Problem
Revision as of 13:27, 15 December 2013 by Dan Tobias (Talk | contribs)

Jump to: navigation, search
File Format
Name Commodore 64 binary executable
Ontology
Extension(s) .prg

A Commodore 64 binary executable is intended to be run on a Commodore 64 or on another machine that is emulating one. These files are often stored with the extension .prg when kept in filesystems that distinguish types by extension. (In the original Commodore environment, they generally didn't have an extension but had file type "PRG" in the directory structure.)

The first two bytes in a PRG file are the memory address that the file should be loaded into (in little-endian format). For a C64 Commodore BASIC tokenized file, intended to be loaded into $801, these bytes are $01,$08. Note that these bytes will be ignored (i.e. a PRG file will be loaded into $801) UNLESS the LOAD command had a non-zero parameter after the device number. i.e. LOAD "*",8 will load a file from device 8 (the typical device number for a disk drive) into $801, while LOAD "*",8,1 will load a file into whatever memory address is specified by the first 2 bytes of the PRG.

Programs and utilities

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox