Skip to main content

CP/M

CP/M Builtin Commands

Paraphrased from the PX4 Operating Manual

Control key commands

Items in bold are keys to be pressed

CTRL + C Restarts CP/M by initiating a warm start
CTRL + E Forces the cursor to the next line of the screen for continued command line input.
CTRL + H Moves the cursor one space to the left in the same manner as the BS key.
CTRL + I Inputs a tab code (same as the TAB key)
CTRL + P Turns on or off the printer echo function. When the printer echo function is turned on, data displayed on the LCD screen is output to the printer (or other device assigned to LST:) each time the RETURN key is pressed. The printer echo function is turned on by pressing CTRL + P once and is turned off when CTRL + P is pressed a second time. (Make sure the printer is connected properly before using this command.)
CTRL + R Redisplays the contents of the current command line.
CTRL + S Momentarily stops processing currently being performed (same as the PAUSE key). Processing can be resumed by inputting this command again.
CTRL + U Cancels the current command line and moves the cursor to the next line on the screen for input of a different command.
CTRL + X Erases the current command line and moves the cursor back to the beginning of the line.
CTRL + Z Terminates input from the keyboard (used in combination with certain CP/M transient commands).

Built-in commands

d: - A drive letter
filematch - an extact filename, or a wildcard match for files.
Items such as [item] are optional, ones such as <item> are compulsary.

DIR [d:][filematch]
Display a list of files in the specified, or current drive.

ERA [d:]<filematch>
Erase specified files. filematch *.* can be used to match all files in the current drive.

REN [d:]newname.ext = oldname.ext
Change the name of a disk file from oldname.ext to newname.ext

SAVE n [d:]filename.ext
Save the specified n number of pages of the transient program area to disk under the specified file name.

TYPE [d:]filename.ext
Display the contents of the specified file on the display screen. Display is only meaningful if the file contents was ASCII text.

USER n
Switches to the specified user area in a disk drive.
A user area is a physical area on a disk which has its own directory and which is managed seperately from the rest of the disk. Data cannot be read from or written to any user area other than that in which CP/M is currently operating. A disk can be divided up into a maximum of 16 user areas.

PIP

Copy FOO.TXT to console (print).

C:PIP CON:=A:FOO.TXT

Write to file from terminal (CTRL-Z to EOF, CTRL-M+J for new line):

C:PIP FOO.TXT=CON: