Copying file to CP/M from a PC / Windows

Post your CP/M & TDOS questions here
Post Reply
User avatar
Site Admin
Posts: 224
Joined: Fri Jul 19, 2019 3:13 pm
Location: Beaver Falls PA

Copying file to CP/M from a PC / Windows

Post by Milli » Sun Feb 02, 2020 8:41 am

There are two (2) simple ways to copy programs and data to a CP/M image to use in AdamEM or other emulator. I will give the details on how to do these below:

1. Using Eric Pearson's ADAM Image Manager

This method is the simplest. You locate the CP/M disk image that you are working with in the left window pane and the source or destination folder on your PC in the right window pane. Then it is just a matter of selecting the file and then either clicking the left or right direction arrow to copy it.

A few caveats:
  • Use version 1.1.1 or better, previous versions had problems with some CP/M files.
  • Use in Windows 10 though you may be able to run it in Windows 8 or 7 as administrator.
  • You can not access the image while this program is running, so you will need to either unmount it from the emulator or exit the emulator.

2. Using Marcel de Kogel's WRDISK and DOSBox

This method is a little more involved but is the method I use. WRDISK is a a group of utilities that allow you to work with an EOS disk from the DOS prompt. The reason I use DOSBox is that they require the ability to run 16 bit programs which a 64 bit Windows system can not. If you have a 32 bit system then you should be able to use these without DOSBox.

To use this method I have a blank EOS disk image in the same folder as WRDISK. I then copy the program or data I want to move to CP/M to this folder and rename it to a 8 character name without any periods. Now I need to import it into an EOS image. I have a small batch file to do this:

Code: Select all

> del import.dsk                              
> copy blank.dsk import.dsk
> wrdisk -d import.dsk -type 48 %1
What this does is:
  • Delete any existing import.dsk image
  • Copy the blank.dsk image to import.dsk
  • Imports the program into the image as type 48 (H or Binary). To import A or ASCII then use type 41. The %1 is the program name we are importing.
Assuming this batch file is saved as "imp.bat" we would use it as follows:

Code: Select all

> imp program
Now that we have have the program in an EOS disk we then open up the AdamEM emulator with a CP/M boot disk as disk 1 and the import.dsk image as disk 2 (see note below). Now start CP/M in the emulator and run the program ADAM.COM. This program copies files from an EOS disk or tape to a CP/M disk or tape. When it asks for the source tell it B. It will then list all the files on that drive. Type in the file name and then when it asks for the type tell it H (or A if you did an ASCII file). Finally tell it the name you want to save it to on drive A along with the extension. This is all you need to do. The nice thing about this method, especially if you are developing CP/M code its you can test your program, then leave the emulator open, go back to developing more code in windows, compile it, then transfer it over again using wrdisk without ever having to close the emulator.

Note, you can also use a blank tape (.ddp) image instead of a disk image by replacing blank.dks with a blank.ddp image, using .ddp for the import image file name and changed -d in the wrdisk command to -t. This way you can mount 2 CP/M disks and mount the import.ddp as tape 1. Then move to drive B (B:) and run A:ADAM.COM. This will set the destination as B:. Now use drive C instead of B in the instructions for using ADAM.COM


Blank images can be found in the archive:

Post Reply