Micropower |
Volume 2 · Number 3 · July 1982 |
Page 14 of 37 |
---|
will tell you that on a Research Machine 380Z you have to type B. CP/M is loaded into the top part of the computers RAM and when it is run it clears the screen and prints a system prompt. In some versions it also prints a system message such as “48K CP/M” before the prompt. The prompt looks like this:
A>
This means that drive A is active and that CP/M is waiting for orders.
Nas-Sys uses single letter commands and there are quite a lot of them. CP/M is far larger than Nas-Sys and more complex but has suprisingly few commands. These are usually referred to as the “built-in” commands and there are 5 of them in version 1.4 of CP/M. Strictly speaking there are more commands than this if you count the instructions that can be given to the system by pressing the Control key in combination with some of the alphabetical keys. The built-in commands are DIR, ERA, REN, SAVE and TYPE. To issue a command to CP/M you would type one of these commands usually followed by the name of a file, sometimes with parameters as well and press return. Before I go into detail about what the commands accomplish, it is first necessary to say something about file names, as these will not be familiar to the majority of Nascom users. Some machines use filenames as part of their tape handling system and one sometimes sees programs which enable the Nascom to put a name at the start of a tape and search for the name when the tape is loaded.
CP/M file names have two parts which are seperated by a full stop. The first part is the name of the file and the second part, called the extension, is used to show the type of file referred to. For example, a file called HELLO.BAS would almost certainly be a BASIC program called “HELLO”. If a command is to refer to more than one file, an ambiguous file name can be specified using the characters “?” and “*”. The question mark represents any single character that could appear in the file name and the star represents up to eight characters in the file name or up to three characters in the file type. For example. the ambiguous file name MARVIN.* would match with the files MARVIN.BAS and MARVIN.INT as well as MARVIN.COM, and *.BA? would match with HELLO.BAS, HELLO.BAK, DATA.BAD and many more. To put it another way, *.* means the same as ????????.??? .
The command ERA, not suprisingly, is used to erase files from the disc you are working on. If you type ERA *.BAS all the files with that extension will vanish from the disc. If you type ERA HELLO.BAS only the file with that name will be erased And if you type ERA *.* , CP/M will ask you if you are joking because that would erase all the files on that disc.
Before you start to erase things it is necessary to know what is actually there. The command DIR enables you to do this. If you type it on its own, CP/M will list all the files on the disc. If you follow the DIR with an ambiguous file name, all the file names that match will be listed.
The name of a file can be changed using the REN command. To change the name of the file HELLO.BAS, for example, you might type REN GREETING.BAS=HELLO.BAS. The new name is always first and the old name last.
Page 14 of 37 |
---|