CP/M ON THE C128 (ARTICLE 3) by Noel Nyman (Copyright 1986 by Geoduck Developmental Systems. Permission to reprint this material is hereby granted, provided this notice is included in the reprinted material.) Before we discuss more resident utilities, let's look at using disk drives with the C128 in CP/M mode. The 1571 drive which was designed to work with the C128 will read regular 1541 type disks and also the MFM type disks used by many 5 1/4 inch CP/M disk machines. This has led to some confusion about just what a "CP/M" disk is. Commodore uses a process called GCR (Group Character Recognition) to record data on its disks. GCR describes the way in which the disk electrical system works. It does not have anything to do with the number of tracks or sectors, or their placement on the disk. Apple also uses a form of GCR, but their track layout is quite different. When a disk is formatted on a 1541, the DOS (Disk Operating System) puts 35 tracks on the disk containing 664 sectors. A 1571 uses exactly the same layout on the "front" of the disk, then repeats it on the "back", for a total of 70 tracks and 1328 sectors. When you format a disk using the CP/M utility "FORMAT.COM", the layout of the tracks and sectors is IDENTICAL to that used in the standard 1541 or 1571. The CP/M disk has its directory area on different tracks and places a BOOT sector on each formatted disk, but the layout is the same. You can prove this by examining a Commodore CP/M disk in C64 mode with a "disk doctor" program. This means that you can use any combination of 1541's and 1571's in a C128 CP/M system. The CP/M disk that came with your C128 is a single sided (1541) disk. You can read it with either disk drive. You must turn it over to read the "back" side. You can also copy a single sided (1541) CP/M disk with any "bit" copier or with the backup command on a dual drive such as the MSD. However, CP/M is NOT practical with a single 1541 disk drive. It's just too slow. If you want to learn about the CP/M system, or experiment with some of the programs, the speed will be tolerable. But any serious programming, database or word processor work will take too long. You are much better off with existing C64 programs for those tasks. Using one of the many "fast load" programs or cartridges will make a C64 system much faster and easier to use than a 1541 CP/M system. If you have a 1571, you can use a 1541 as the "B" drive with better results. The disk operations will still be slow on the 1541. But you can do your primary work with the faster drive. If you are contemplating the purchase of a C128 and two 1571's JUST to run CP/M, I advise against it. For the same money you could purchase a low end or used CP/M computer such as a Kaypro which will run CP/M many times faster than a C128. However, for the combination of a fantastic Basic, excellent sound and graphics, C64 compatibility (mostly) and CP/M as frosting on the cake, the C128/1571 system is a good bargain. Last time we used the "DIR" resident utility to look at a disk directory. Enter the command again, and look at the bottom of the listing. If the INPUT CP/M1 disk is in your drive, you'll see the phrase "System file(s) exist". Now enter the command A> dirsys You should see only the file "CCP.COM" followed by the phrase "Non-system file(s) exist". The term "system" refers to an "attribute" or characteristic given to certain files. It does NOT refer to the extension ".SYS". Notice that the file "CPM+.SYS" appears when you used the "DIR" command, but is not listed with "DIRSYS". The system attribute is important for hard disk or multi-user systems. We'll look at it more closely when we discuss the "USER" command. But system files are also less likely to be accidentally erased. To erase a system file, you must use a special command. So it makes sense to protect your most valuable files in this way. We'll use a utility called "SET.COM" to change "CPM+.SYS" to a system file. Place the original CP/M disk you received with your C128 in drive A and use "DIR" to be sure you have the side containing "SET.COM". Then if you have two disk drives, place the INPUT CP/M1 disk in drive B and type: A> set b:cpm+.sys[system] Don't leave a space between the ".sys" and the left bracket. Be sure to use brackets, shifted ":" and ";". If you have only one drive, type: A> set e:cpm+.sys[system] In either case, CP/M will LOAD the program "SET.COM" from the disk in drive A. For a two drives, CP/M will then change the attribute of the file on the disk in drive B. For one drive, CP/M will prompt you to place the "E" disk in drive A, and then changes the attribute. Now use "DIR" and "DIRSYS" to check your work. "SET.COM" has many other uses we'll look at later. Next time we'll look at the rest of the CP/M resident utilities. INPUT CP/M1 disk is available with several useful programs, the newest CP/M operating system, and text files of the first four of these articles. Check the order form elsewhere in this issue.