CP/M Stuff
by AUGment


November / December 1985

The CP/M operating system, has some good stuff that will help you overcome some of your frustrations and will also answer some questions you may want answered while working with other ADAM software.

Let's try some experiments using the CP/M operating disk in drive A: and a document or program disk in drive B:.

READY? O.K. ... At the A> prompt type DIR and <return>. WOW! Look at ail the files on the CP/M disk. We will explain some of them here, but don't get too carried away because some can create problems if you don't understand them. Now type DIR B: and <RETURN>. This time you get a list of all the files on your disk in drive B:.

Notice two programs or maybe three that look familiar? Sure, you must have used FORMAT if you have a disk in drive B:. The COPY program should have been used, unless the disk you are using is the original. (It should NOT be! And ... if your disk in drive B: is "bootable", then you must have used the SYSGEN program.

"So, how much space is left on the disk?", you ask. One of the CP/M files is named STAT.COM. Just type the word STAT (CP/M does not need the extension COM). Now you know how much space (in bytes) is left on the disk. Try using STAT on drive B: (STAT B:). "GREAT ... but how much space does each file take up on the disk?" Here's where you become a "pro". Just type STAT *.* (if the screen scrolls too fast just hit <CONTROL>-S to stop it and <CONTROL>-S again to continue). Now do it for the disk on drive B: (STAT B:*.*).

There are many other ways that STAT can be used, but, we will continue to explore the vast power of CP/M in other issues of the newsletter. That is, if you want us to continue. Let us know.

January / February 1986

The last time we met, we used the DIR program in CP/M to see all the files on a disk. We saw STAT.COM and COPY.COM but we didn't see DIR. HOW COME!!!??? Well, it seems there are some programs that live with CP/M and they are called resident programs. The programs that you DO see listed are called transient programs. That means that they can be moved to another disk, but you can only move resident programs by sysgening a disk [SYSGEN.COM]. Let's try another resident program called TYPE.

At the A> prompt type:

TYPE EXAMPLE.TXT and <return>

That's right. You're now looking at a program called EXAMPLE.TXT. Does that mean you can see all your files on the screen? Well, not exactly. Try typing TYPE COPY.COM <return> at the A> prompt. What's happened to all the good stuff we had before? This looks like "garbage." It is! The only readable files are written in "English." Those files are called "ASCII" files. COPY.COM is not written in ASCII; it is written in machine language.

Now, let's make use of the TYPE program. First make sure your printer is online and paper is aligned. At the A> prompt hit Ctrl-P (this toggles the printer ON) and then type TYPE EXAMPLE.TXT <return>. Your printer should have printed exactly what you see on the screen (including the words TYPE EXAMPLE.TXT). When you finish, make sure that you hit Ctrl-P again. That toggles the printer OFF. You can use this method to get "hard copy" directly from your disk by using our friendly CP/M power.

Try this one on your own. Use the Ctrl (ON) and type DIR <return>. There's something you can use!

In our next newsletter, we will discuss a powerful transient program called PIP.COM and why it is probably the most widely used program when working with files and making back-ups.

Back to Top