p2000c-asm is a small command-line frontend for the original CP/M
ASM.COM and LOAD.COM. It executes both programs on an emulated Z80 and
maps the few CP/M BDOS services they need directly onto host files. It does
not boot CP/M, create a disk image, or emulate the P2000C hardware.
GNU GCC is the intended toolchain:
CC=gcc CXX=g++ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
ctest --test-dir build --output-on-failureThe executable is build/p2000c-asm.
./build/p2000c-asm PROGRAM.ASM
./build/p2000c-asm -o bin/PROGRAM.COM --keep-intermediates PROGRAM.ASMThe default output is PROGRAM.COM beside the source. Input with LF, CR/LF,
or CR line endings is accepted and converted to CP/M text in a temporary
directory. The source itself is not modified.
--keep-intermediates also writes the .HEX and .PRN files. Use
--verbose to show the original programs' console output.
Run p2000c-asm --help for all options.
The historical ASM.COM and LOAD.COM are runtime data, not linked into the
host executable. By default CMake copies cpm/ASM.COM and cpm/LOAD.COM
beside the built executable. Alternate copies can be selected with --asm
and --load, or with the P2000C_ASM_COM and P2000C_LOAD_COM environment
variables.
Source names must follow the CP/M 8.3 limit. This version intentionally supports one source file per invocation.