19

The standard for business computing in the seventies and eighties was 80 columns, and CP/M was primarily for business computing, so it's unsurprising that CP/M typically ran in 80 columns. For example, the Commodore 128 was nominally capable of running it in 40 column mode, but actually just used horizontal scrolling to simulate an 80 column display.

Was CP/M ever used, in practice rather than just as a tech demo, in less than 80 columns? Were any computers ever designed with less than 80 columns to run CP/M?

4
  • 1
    Interestingly, the original plan for the C128 was to support the Commodore CP/M cartridge for the C64, which was fairly popular, and also reliant the 40 column screen. The engineers couldn't get it working, so just added the Z80 to the C128 instead.
    – Brian H
    Jul 3, 2018 at 17:01
  • 4
    There is nothing intrinsic in CP/M about the screen output device except you can send characters to it. Anything above that must be implemented in the individual transient program! Jul 4, 2018 at 13:29
  • 1
    IIRC the Olivetti M10 also used CP/M, on a screen with 240×64 pixels with 6×8 character cells, so 40×8 characters. Jul 4, 2018 at 16:29
  • 1
    For memory mapped computers the screen size often reflected the amount of memory that could be spared as well as the limit set by the tv signal. Initial 64x16 fit in 1k, later 80x25 fit in 2k. en.m.wikipedia.org/wiki/VDM-1 Jul 28, 2022 at 8:34

8 Answers 8

20

Was CP/M ever used, in practice rather than just as a tech demo, in less than 80 columns?

Most prominent here may be the Apple II with Micro-Soft's Softcard. While most users did use it with an additional 80 column card, it also worked well using the basic 40 character display.

After all, CP/M itself wasn't tied to any display size or a CRT at all. Various software in contrast did require a certain minimal display type, but that's much like graphics software requiring some VGA feature and therefore, while being a plain MS-DOS program, not able to perform on a PC without VGA (or better).

CP/M itself didn't provide any information about the availability of a CRT or its dimensions or modes. BDOS only offered very basic calls to output a character. In so far its handling of a terminal is much like with Unix, where as well all screen handling was part of an application. Unlike Unix, CP/M never developed a standard solution, so many programs, including all standards like Wordstar et. al., included their own way to configure and command sequences to handle screen dimensions.

Were any computers ever designed with less than 80 columns to run CP/M?

Answering this might be fuzzy, as CP/M was per definition not meant for a special computer, nor were most computers running CP/M designed for it.

Let's take the TRS-80 Model one. While maybe not 'designed' for anything that hasn't been produced by Tandy, it also needed a modification (ROM relocation) to run CP/M at all. Still, CP/M was not only available but also worked fine using the 64x16 display.


Wilson also reminded us of the Osborne 1, a computer build for the use of a software bundle based on CP/M. It originally featured a 52x24 display showing a window of a 128x32 virtual screen. All applications were, by default, configured for a 52x24 screen and, where useful, enhanced to take advantage of the virtual screen. For example, Wordstar and Supercalc did move the screen when the cursor reached the left or right border. When the document was set to be wider then 56 columns that is. Handling was done via a set of escape sequences or 'special' (read: non-CP/M) BIOS calls.

Short time after is introduction an update called Screen-Pac became available to show 80 or 104 columns as well, on an external CRT. To make it run a new (patched) BIOS had to be installed via SYSGEN. The new BIOS offered an additional call to set the visible screen size as well as the virtual.

6
  • 5
    CP/M 3 added the ability for a program to query screen dimensions - DIR uses this to calculate how many columns to display, and when to pause for a page.
    – john_e
    Jul 3, 2018 at 21:21
  • 1
    I've checked the source of the CP/M 2 CCP, and its implementation of DIR is hardcoded to output four columns. That equates to an assumed minimum screen / teletype width of 60 characters.
    – john_e
    Jul 4, 2018 at 16:32
  • 1
    @john_e that might be patched on such systems. Is it more than a one-byte fix? Jul 27, 2022 at 16:00
  • @ThorbjørnRavnAndersen: It's more complicated than that - it uses bitwise AND on the column number to detect if a column is the first or last column, so supporting a number of columns that is not a power of 2 would require changing more than one byte.
    – john_e
    Jul 27, 2022 at 21:55
  • 1
    @john_e I had a look at OS2CCP.ASM in cpm.z80.de/download/cpm2-plm.zip where as you say the column number is and'ed with 11b to see if column four has been reached and if so, a CRLF is done. (direct: routine), but I cannot see the "is first colum" you mention. There is, however, a test for "is column 3" (straight cpi) which appears to be for trailing spaces. It should be a simple change when porting. Jul 27, 2022 at 22:50
8

CP/M plus works nicely on a ZX Spectrum +3 in the following terminal modes (it emulates a DEC VT52 Terminal in CP/M Plus using its very limited screen resolution)

  • Mode 0: 24 x 32 screen (23 x 32 if status line enabled)
  • Mode 1: 24 x 51 screen (23 x 51 if status line enabled)
  • Mode 2: (jump)scrolling 24 x 80 screen (23 x 80 if status line enabled). This mode makes me a bit nervous, especially with programs that tend to move the cursor around a lot (this mode jump-scrolls the displayed part of the emulated 24x80 screen to the area that holds the cursor automatically, so I don't normally use it.

CP/M was never designed with specific terminal capabilities in mind. If at all, it was the applications that couldn't cope with certain terminals and (lacking) terminal capabilities. Most CP/M applications can, however, (within limits) be adapted to smaller terminal sizes. Turbo Pascal or WordStar work nicely on the ZX Spectrum, for example, after some fiddling with their terminal setup programs.

1
  • 1
    Crash! agreed with you on mode 2: "Spectrum CP/M can display a maximum of 51 characters per line, or 32 per line with full colour control. Most CP/M packages expect an 80-column display. To get around this, Locomotive provide a simulated 80-column mode, showing 80 columns in two overlapping 51-column sections. There’s a marker on the status line to show which side you’re on. Flicking back and forth can follow the cursor, or be manually controlled. Either way it works with most packages, but makes some very hard to use."; crashonline.org.uk/53/cpm.htm
    – Tommy
    Jul 3, 2018 at 20:49
8

The Osborne 1 has a 56 column screen. Plenty of applications ran really well on that computer; M-BASIC, CHESS, are two I remember. I think Wordstar ran on the Osborne 1 as well.

The computer actually has 128 columns of addressable text. The user can scroll back and forth with ctrl+arrow keys. This feature was maybe not used that much. Most applications stayed in the 56 columns.

3
  • Great example, yes, I realy forgot about the Osborne - as it was definitly build for the use of a software bundle based on CP/M.
    – Raffzahn
    Jul 4, 2018 at 9:48
  • @Raffzahn do you know whether any software, for example Supercalc, took advantage of the text window scrolly thing? Jul 4, 2018 at 9:58
  • 1
    Yes, even by default. when the cursor reched the left or right screen, the window was moved by either of the standard programms. There was a set of special (read non-CP/M) BIOS calls to do so.
    – Raffzahn
    Jul 4, 2018 at 10:09
6

Another system which ran CP/M in other than 80 columns was the Exidy Sorcerer. It had a monochrome text output that was 64x30.


rwallace mentioned the C128 in the question, referring to a scrolling 80-column mode on a screen physically 40 columns wide. I was not even aware of this mode. Since my monitor supported both composite and digital RGB format, I'd use the latter whenever not in C64 mode. This normally gave an 80x25 text resolution.

I say "normally" because a knowledgeable user could program the 8563 VDC (RGBI video chip) to give custom resolutions such as 100 columns. If you hacked your 128 to double the 8563 video RAM, you could even run it at text resolutions such as 100x50. Since CP/M doesn't really care about screen resolution (as far as it knew it was talking over a serial port to a video terminal), using such a large screen worked fine. IIRC, even outside of CP/M, the C128-mode screen handled the larger size just fine as well. I don't remember encountering software assumptions that the screen was exactly 80 columns wide.

6

The original video displays for S-100 machines were normally 64x24 or 25. Practically every machine used this mode. 80-columns did not appear until well after CP/M was widely used.

3
  • 3
    I disagree. Those were the first integrated video displays. But plenty of CP/M machines - and later CP/M-86, MP/M, MP/M-86, etc. used one or more serial terminals. The first of those were teletype ASR33s, but by 1976 you already had the ADM-3A, VT52 and similar 80-column terminals which were heavily used with CP/M systems (as well as other micro & minicomputers). Even some of the integrated systems were really serial terminal + computer that happened to be in the same box, but not a built-in video display as was the case with the consumer systems (TRS-80, Apple II, etc.). Jul 4, 2018 at 19:49
  • Terminals are not video displays in this context, but yes, I see the term overlap. Jul 4, 2018 at 19:59
  • 1
    @manassehkatz-Moving2Codidact I believe even the ASR33 was only 72 columns, not 80. Jul 27, 2022 at 17:03
6

Turbo Pascal's IDE layout is optimized for 40 columns. However Borland made some kind of termcap. You may change the patch area of every Pascal program, the Turbo Installer TINST.COM (German doc) is your friend. Offset $0168 for example defines the screen width, you don't need the source code!

At least WordStar and Multiplan have their own patch area. Finally CP/M Plus has application independent support... see also https://retrocomputing.stackexchange.com/a/8703/7534

4
  • 3
    This is good start for an answer; do you think you could flesh it out a bit more? For example, what is Turbo Pascal's default WRT compiled programs' output and how exactly does TINST.COM change it? What's magic about the offset and what is written there? When you say "poor man's termcap", were there other ways to run at <80 columns? I presume, too, that this solution is Turbo Pascal-specific, is this correct? If yes, did similar techniques exist for other compilers? Jul 16, 2018 at 8:30
  • @AlexHajnal Turbo Pascal is the only real IDE I know of for CP/M (and one of the first for MS-DOS, CP/M-86). Most other compilers (all the ones I know of for CP/M and for the early days of MS-DOS and CP/M-86) were command-line only. Jul 17, 2018 at 18:37
  • I used Turbo Pascal on a KayPro IV, and it used all 80 columns.
    – RonJohn
    Jun 8, 2019 at 21:35
  • @RonJohn "optimized" means the menu is 40 columns, not the editor itself.
    – Polluks
    Mar 26, 2020 at 10:40
5

A Russian Spectrum-based CP/M machine of 1991 - Sinclair Profi - used 64 columns by default, but could be switched to 80 columns.

Basically and roughly, Profi is a Spectrum-128 with up to 1024 MB RAM (in 16K pages mounted into 16K address space windows), ability to mount RAM instead of ROM in the lowest 16K (essential for CP/M), extended video mode 512x240 with 1 attribute byte per 1 pixel byte (text mode is implemented in software), and integrated Beta Disk interface (TR-DOS) with a hardware patch allowing to access the floppy drive controller chip from the code in RAM (original Beta Disk on Spectrum made controller ports available only to the code in its ROM). Also it supported an optional controller for an XT keyboard, passing extra (non-ZX) keys to the software. These features allowed the machine to work in a Spectrum-48/128-with-TR-DOS mode, and in CP/M mode.

In 64 column mode, it borrowed the 8x8 CGA font, and its two-panel file manager looked pretty much as Norton Commander on a PC, which was a huge marketing point - in 1993, Sinclair Profi with a CGA-like monitor, two floppy drives, a matrix dot printer, and a PC keyboard costed around 300 USD, while a typical engineer salary in Russia was about 100 USD, and a used PC/XT costed around 1000 USD.

In 80 column mode, a 6x8 font was used, appearing somewhat blurry on a TV-compatible (CGA-like) monitor, so most preferred to work in 64 column mode.

1
3

Some Memotech systems ran CP/M in 56 column mode, courtesy of a modifed boot ROM with an alternate screen driver. http://www.nyangau.org/bootrom/bootrom.htm

1
  • 1
    Welcome to Retrocomputing Stack Exchange! This answer would be improved by providing some more information from that page; if you don't want to paraphrase it, you can use > blockquote syntax to quote it.
    – wizzwizz4
    Dec 20, 2018 at 15:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .