CP/M 2.2
by Solomon Swift


Last month we discussed an easy way to make a backup copy of CP/M. This is vital. Once you’ve made the backup, put the original away and work ONLY with the backup.

When working with any sophisticated piece of software you need to master the fundamentals first. As obviously simple as this sounds, most of us aspiring hackers too often allow ourselves to be overcome with eagerness. Admittedly, having a firm background in SmartBASIC and some experience with Z80 encoding will augment your understanding of CP/M. However, you’ll find this powerful operating system to be most useful if you “conquer” it in a logical step by step process. For many of you, these first few articles will only be review. In due time, though, we’ll delve into the more rewarding aspects, such as modifying CP/M and creating machine code programs.


The DIR command is used to display a list of the files on a specific storage medium. Simply typing DIR and pressing [RETURN] will display the filenames on the current drive. To see the filenames in another drive without changing the default drive, follow DIR with a space, the drive label (A, B, C, or D), and a colon. Then press [RETURN]. For example,


will display the files in drive B. You can now type DIR (without a drive label) to see the directory for the default drive.

To change drives, simply enter the drive label, a colon, and then press [RETURN]. Now you can enter DIR or whatever command you prefer on the most recently selected drive.

If there are no files in the directory, you’ll get the message “NO FILE”. The DIR command does not reveal whether or not a data pack or disk has the operating system stored on it (as by dint of SYSGEN).

The DIR command can also be used to search for a specific filename. For example,


will search for the EXAMPLE.TXT file on drive B (without changing the default drives). If the filename is not found, the “NO FILE” message will be displayed.

From the October 1986 issue of Nibbles & Bits (PDF)

Back to Top