Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
CP/M
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Disk formats == [[IBM System/34]] and [[IBM 3740]]'s 128 byte/sector, single-density, single-sided format is CP/M's standard 8-inch [[Floppy disk#8-inch floppy disk|floppy-disk format]]. No standard 5.25-inch CP/M disk format exists, with Kaypro, [[George Morrow (computers)|Morrow Designs]], Osborne, and others each using their own.<ref name="pournelle198204"/><ref name="pournelle198209">{{Cite magazine |last=Pournelle |first=Jerry |date=September 1982 |title=Letters, Pascal, CB/80, and Cardfile |url=https://archive.org/details/byte-magazine-1982-09/page/n314/mode/1up?view=theater |access-date=2024-12-30 |magazine=BYTE |pages=318β341}}</ref>{{r|meyer19820614}}<ref name="128book"/> Certain formats were more popular than others. Most software was available in the Xerox 820 format, and other computers such as the Kaypro II were compatible with it,<ref name="derfler19821018"/><ref name="byte198309"/> but ''InfoWorld'' estimated in September 1981 that "about two dozen formats were popular enough that software creators had to consider them to reach the broadest possible market".<ref name="hogan19810914state"/> [[JRT Pascal]], for example, provided versions on 5.25-inch disk for [[North Star Computers|North Star]], Osborne, Apple, Heath/Zenith [[hard sector]] and [[soft sector]], and [[Intertec Superbrain|Superbrain]], and one 8-inch version.<ref name="byte198212"/> Ellis Computing also offered its software for both Heath formats, and 16 other 5.25-inch formats including two different TRS-80 CP/M modifications.<ref name="byte198312"/> Various formats were used depending on the characteristics of particular systems and to some degree the choices of the designers. CP/M supported options to control the size of reserved and directory areas on the disk, and the mapping between logical disk sectors (as seen by CP/M programs) and physical sectors as allocated on the disk. There were many ways to customize these parameters for every system<ref name="Johnson-Laird_1983"/> but once they had been set, no standardized way existed for a system to load parameters from a disk formatted on another system. While almost every CP/M system with 8-inch drives can read the aforementioned IBM single-sided, single-density format, for other formats the degree of portability between different CP/M machines depends on the type of disk drive and controller used since many different floppy types existed in the CP/M era in both 8-inch and 5.25-inch sizes.{{r|pournelle198209}} Disks can be hard or soft sectored, single or double density, single or double sided, 35 track, 40 track, 77 track, or 80 track, and the sector layout, size and interleave can vary widely as well. Although translation programs can allow the user to read disk types from different machines, the drive type and controller are also factors. By 1982, soft-sector, single-sided, 40-track 5.25-inch disks had become the most popular format to distribute CP/M software on as they were used by the most common consumer-level machines of that time, such as the Apple II, TRS-80, Osborne 1, Kaypro II, and IBM PC. A translation program allows the user to read any disks on his machine that had a similar format; for example, the Kaypro II can read [[TRS-80]], [[Osborne 1|Osborne]], [[IBM PC]], and [[Epson QX-10|Epson]] disks. Other disk types such as 80 track or hard sectored are completely impossible to read. The first half of double-sided disks (like those of the Epson QX-10) can be read because CP/M accessed disk tracks sequentially with track 0 being the first (outermost) track of side 1 and track 79 (on a 40-track disk) being the last (innermost) track of side 2. Apple II users are unable to use anything but Apple's GCR format and so have to obtain CP/M software on Apple format disks or else transfer it via serial link. The fragmented CP/M market, requiring distributors either to stock multiple formats of disks or to invest in multiformat duplication equipment, compared with the more standardized [[IBM PC]] disk formats, was a contributing factor to the rapid obsolescence of CP/M after 1981. One of the last notable CP/M-capable machines to appear was the [[Commodore 128]] in 1985, which had a Z80 for CP/M support in addition to its native mode using a 6502-derivative CPU. Using CP/M required either a [[Commodore 1571|1571]] or [[Commodore 1581|1581]] disk drive which could read soft-sector 40-track [[Modified frequency modulation|MFM]]-format disks. The first computer to use a 3.5-inch floppy drive, the [[Sony SMC-70]],<ref name="Sony-SMC-70"/> ran CP/M 2.2. The Commodore 128, [[Bondwell-2]] laptop, Micromint/Ciarcia SB-180,<ref name="Ciarcia_1985"/> [[MSX]] and [[TRS-80 Model 4]] (running Montezuma CP/M 2.2) also supported the use of CP/M with 3.5-inch floppy disks. CP/AM, [[Applied Engineering]]'s version of CP/M for the Apple II, also supported 3.5-inch disks (as well as RAM disks on RAM cards compatible with the Apple II Memory Expansion Card).<ref>{{cite book |title=CP/AM 5.1 User Manual|publisher=Applied Engineering|page=1|url=https://archive.org/details/AE_Z-80_Plus_CPAM_5.1_Manual_v1.21/|accessdate=22 May 2020}}</ref> The [[Amstrad PCW]] ran CP/M using 3-inch floppy drives at first, and later switched to the 3.5 inch drives. === File system === File names were specified as a string of up to eight characters, followed by a period, followed by a file name extension of up to three characters ([[8.3 filename|"8.3" filename format]]). The extension usually identified the type of the file. For example, <code>.COM</code> indicated an executable program file, and <code>.TXT</code> indicated a file containing [[ASCII]] text. Characters in filenames entered at the command prompt were converted to upper case, but this was not enforced by the operating system. Programs ([[MBASIC]] is a notable example) were able to create filenames containing lower-case letters, which then could not easily be referenced at the command line. Each disk drive was identified by a [[drive letter]], for example, drive <code>A</code> and drive <code>B</code>. To refer to a file on a specific drive, the drive letter was prefixed to the file name, separated by a colon, e.g., <code>A:FILE.TXT</code>. With no drive letter prefixed, access was to files on the current default drive.<ref name="px4"/> File size was specified as the number of 128-byte ''records'' (directly corresponding to disk sectors on 8-inch drives) occupied by a file on the disk. There was no generally supported way of specifying byte-exact file sizes. The current size of a file was maintained in the file's [[File Control Block]] (FCB) by the operating system. Since many application programs (such as [[text editors]]) prefer to deal with files as sequences of characters rather than as sequences of records, by convention text files were terminated with a [[control-Z]] character (ASCII [[Substitute character|SUB]], [[hexadecimal]] 1A). Determining the [[End-of-file|end]] of a [[text file]] therefore involved examining the last record of the file to locate the terminating control-Z. This also meant that inserting a control-Z character into the middle of a file usually had the effect of truncating the text contents of the file. With the advent of larger removable and fixed disk drives, disk de-blocking formulas were employed which resulted in more disk blocks per logical file allocation block. While this allowed for larger file sizes, it also meant that the smallest file which could be allocated increased in size from 1 [[Kilobyte|KB]] (on single-density drives) to 2 KB (on double-density drives) and so on, up to 32 KB for a file containing only a single byte. This made for inefficient use of disk space if the disk contained a large number of small files. File modification [[system time|time stamps]] were not supported in releases up to CP/M 2.2, but were an optional feature in MP/M and CP/M 3.0.<ref name="Brown-Strutynski-Wharton_1983"/> CP/M 2.2 had no [[subdirectories]] in the file structure, but provided 16 numbered user areas to organize files on a disk. To change user one had to simply type "User X" at the command prompt, X being the user number. Security was non-existent and considered unnecessary on a personal computer. The user area concept was to make the single-user version of CP/M somewhat compatible with multi-user MP/M systems. A common patch for the CP/M and derivative operating systems was to make one user area accessible to the user independent of the currently set user area. A USER command allowed the user area to be changed to any area from 0 to 15. User 0 was the default. If one changed to another user, such as USER 1, the material saved on the disk for this user would only be available to USER 1; USER 2 would not be able to see it or access it. However, files stored in the USER 0 area were accessible to all other users; their location was specified with a prefatory [[Path (computing)|path]], since the files of USER 0 were only visible to someone logged in as USER 0. The user area feature arguably had little utility on small floppy disks, but it was useful for organizing files on machines with [[hard drive]]s. The intent of the feature was to ease use of the same computer for different tasks. For example, a secretary could do [[data entry clerk|data entry]], then, after switching USER areas, another employee could use the machine to do [[Invoice|billing]] without their files intermixing.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)