Retrocomputing Stack Exchange is a question and answer site for vintage-computer hobbyists interested in restoring, preserving, and using the classic computer and gaming systems of yesteryear. Join them; it only takes a minute:

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?

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 HJul 3 '18 at 17:01

3

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!
– Thorbjørn Ravn AndersenJul 4 '18 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.
– Simon RichterJul 4 '18 at 16:29

7 Answers
7

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'sSoftcard. 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 reched 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.

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_eJul 3 '18 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_eJul 4 '18 at 16:32

Additionally some programs could write directly to screen memory making them much faster. If I recall correctly WordStar could do this.
– Thorbjørn Ravn AndersenDec 20 '18 at 22:33

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.

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
– TommyJul 3 '18 at 20:49

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.

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.
– RaffzahnJul 4 '18 at 9:48

@Raffzahn do you know whether any software, for example Supercalc, took advantage of the text window scrolly thing?
– WilsonJul 4 '18 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.
– RaffzahnJul 4 '18 at 10:09

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.

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!

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?
– Alex HajnalJul 16 '18 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.
– manassehkatzJul 17 '18 at 18:37

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.).
– manassehkatzJul 4 '18 at 19:49

Terminals are not video displays in this context, but yes, I see the term overlap.
– Maury MarkowitzJul 4 '18 at 19:59

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 '18 at 15:07