An emulator for testing CP/M programs
I cross-develop CP/M programs on Linux with the Suite8080 assembler and run them on a number of platforms, from software emulators to the Z80-MBC2 computer. But to test the code I use an emulator for Linux called ANSI CP/M Emulator and disk image tool, or just CPM.
CPM is unique in that it reduces development and testing friction. The emulator can execute CP/M programs stored on the Linux file system by passing CP/M executable files as arguments, such as:
$ cpm cpmprog
where cpm
is the emulator and cpmprog.com
is a .COM
file on Linux. In addition, the current Linux directory appears as the A:
drive from CP/M, so any .COM
files there on Linux can be executed from CP/M like this:
A>cpmprog
Again, cpmprog.com
is a .COM
file on Linux.
This feature shortens the development cycle, as the emulator can access program files cross-assembled on the same file system it runs on.
Other emulators require copying files to disk images and mounting the images from the emulated environment. And before they can be run on the Z80-MBC2 or other hardware, CP/M programs need to be transferred via XMODEM or other means.
Once a .COM
program is tested and debugged, I run it on richer CP/M environments like the z80pack emulator or the Z80-MBC2.
Discuss... Email | Reply @amoroso@fosstodon.org