An MS-DOS style operating system for the Commodore 64.
command64 provides a familiar command-line interface and DOS-compatible API for the C64. It leverages the RAM Expansion Unit (REU) to provide up to 16MB of virtual memory and a robust handle-based file system.
- MS-DOS Shell: Commands like
DIR,TYPE,CLS, andVER. - Environment Variables: Persistent configuration (
SET,PATH) stored in the REU. - Service Bus API: Stable INT 21h-style entry point for external programs (JSR $1000).
- Virtual Memory: 4KB page-based allocation in the REU (up to 16MB).
- Handle-based I/O: Modern file management system mapping handles to C64 channels.
- Multi-Device Support: Seamlessly switch between C64 devices 8-11.
- External Utilities: Support for external applications (e.g.,
DEBUG,LABEL,CONWAY,PACMAN). - App Manager: Resident registry of loaded programs (
APPS/PS,FREE) with memory-safe pre-flight validation and dynamic auto-slotting onLOAD. - Binary Relocator: Load relocatable binaries at arbitrary memory addresses.
- Commodore 64 (or VICE emulator)
- RAM Expansion Unit (REU) - 512KB or larger recommended.
- Java Runtime Environment (for KickAssembler)
- CMake (version 3.20 or newer)
- GNU Make (optional wrapper)
The project is built using CMake. A Makefile wrapper is also provided at the root for convenience.
-
Configure CMake:
cmake -B build
-
Build the OS and all utilities:
cmake --build build # OR using the Makefile wrapper: make all -
Build the OS disk image only:
cmake --build build --target image_d64 # OR using the Makefile wrapper: make image
- Load the compiled
command64.prginto your C64 or emulator. - Run with
SYS 4608(or simplyRUNif loaded via BASIC). - To load external utilities, ensure they are present on the same disk as the OS.
| Command | Description |
|---|---|
CLS |
Clear the screen. |
DIR |
List files on the current disk. |
TYPE |
Display the contents of a file (e.g., TYPE README.TXT). |
COPY |
Copy a file to another location. |
DEL |
Delete a file from disk. |
REN |
Rename a file on disk. |
DRIVE |
Switch active device (8, 9, 10, 11). Aliases: DEVICE, DEV. |
SET |
Display or set environment variables. |
PATH |
Display or set the executable search path. |
LOAD |
Load a program by name, optionally at an address; auto-picks a free memory region if omitted. |
RUN |
Execute a program by name or address; with no argument, runs the program already loaded at the base of user program space. Alias: GO. |
APPS |
List currently loaded/registered programs (name, address, size). Alias: PS. |
FREE |
Deregister a named program, or all loaded programs if no name is given. |
VOL |
Display the disk name/ID. |
VER |
Show OS version and build information. |
HELP |
Display available commands. |
EXIT |
Return to BASIC. |
See the User Manual for a comprehensive guide to using command64.
Details on external utilities like DEBUG can be found in the Applications Guide.
See the following documents in the docs/ directory: