Hot answers tagged

45

(2017.03.03) I have added a second answer with diagrams and more technical details. This answer is already huge and self-contained; the other focuses on the complexities due to hardware. Why does the C128 perform poorly when running CP/M? The Z80A was sort of an after-thought in the C128 design. Before release it had been touted as "fully C64 compatible" (...


38

They both shared the same memory so it didn't really forward instructions. The Z80 card stopped the 6502 running using the DMA signals and the system swapped between the two by writing to $CN00 where N is the slot number. Since the memory was shared the Z80 stuffed some values (A,X,Y,P) into the 6502 zero page ($F045 and up from the Z80 side) stored the ...


32

Was it the original intention to combine them? No. The Z80 was not even part of the original design. It was added out of necessity to meet a "100% C64 compatible" claim of the original marketing. The C64 offered a CP/M expansion cartridge, which for some reason would not run correctly when inserted into early C128 prototypes. So about 2 months into a 5-...


31

The Commodore 128 was intended to be a fully-compatible, more professional, upgrade to the popular Commodore 64. The marketing called for addressing the most widely criticized shortcomings of the C64 that made it unsuitable in competing with more "professional"/business-oriented machines like the Apple //e and //c and the IBM clones. C64 compatibility was ...


29

If we consider only real Z80 (i.e. no emulation and no FPGA), probably the fastest Z80 compatible CPU is eZ80 (runs at 50 MHz, but has 3-stage pipeline, so in theory it could reach 3× the speed of Z80 at the same frequency). This hobbyist project describes eZ80 board and CP/M running natively on in, author says "The system runs Z80 code on average 30 times ...


28

The BIOS originated as part of the CP/M operating system. It was the "layer" that interfaced directly with the hardware and as such, was usually machine specific. The idea is that, if you separate out the hardware interactions into one module and provide a standardised interface that the rest of the OS uses (and user programs), then the only thing you need ...


26

Remember that these systems (not only the Osborne 1) didn't have harddisks. Everything ran from floppies. So usually you had one floppy where the program was on, together with OS related files. And another floppy for your data, texts and so on. That was workable with two drives, but still was impractical if you wanted to copy data. Usually there was some ...


24

I'm Linards Ticmanis, the guy who put out the CPMFAST package in 1999 that has been mentioned several times in the other answers (although I go by the nickname TeaRex on here). While creating that, I had to take a deep look into the innards of C128 CP/M, so that I think I can say that I have a rather detailed understanding of the way it works internally (or ...


23

... a scaled-down, cost-reduced, clone of the Intel 8080. The Z80 had a massively extended instruction set, featured more addressing modes and had more registers than the 8080. It also had a built-in DRAM refreshing logic. ... and it was more expensive than the 8080! This is the opposite of "cost-reduced". It only used a 4-bit ALU. I assume this would ...


22

Hard to tell. The fastest Z80 CP/M system I had in ye olde days (aka ~1982) was a Z80H card for my Apple II running at 12 MHz. It got its own 64 KiB and was a clone of a similar card running at 6 MHz. We thought we could speed it up a lot, but most cards produced wouldn't get past 10 MHz. Don't get me wrong: that's still not only awesome compared with the ...


22

The answer depends on the version. CP/M 2.2 did not support any loadable device drivers. There simply was no provisioning to do that. Originally, the in-built device drivers were limited to storage, console, and serial drivers. The system vendor could extend the BIOS with new devices, but that was fixed during the system build and nothing was loadable on ...


21

What would happen if I transferred this file to a CP/M system? Depends on your transfer utility and how it handles the data presented. Since the CP/M end of file marker is control Z or 1A in hex, will CP/M think that my 256 byte file stops when it gets to byte 1A? No, at least not the OS itself. CP/M does not handle CTRL-Z (or any content) specially. ...


19

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. ...


18

My first answer attempts to answer all the OP's questions without going too deep into the hardware details. Since posting that answer, I have had the pleasure of corresponding for several days with Bil Herd, the lead designer of the C128 project. In addition to what I have learned from him, I have done some additional research on my own. This answer focuses ...


18

In 8080 Assembler M is the memory referenced to by HL. Depending on the assembler used this would be written as ADD M (Original Intel 8080 syntax) or ADD A,M (Later Intel syntax as used for example by CP/M's own ASM (*1)) The Z80 assembler equivalent would be ADD A,(HL) (Zilog notation) Are you sure the source you're compiling made for the Z80 (and a ...


15

From left to right: DEC VT100 family terminal, which may have been connected to some other system or in VT180 form, which was a VT100 with a card that turned it into a standalone computer. IBM PC 5150 NEC APC


15

Two-dimensional positioning was not provided by basic CP/M; the BIOS provides only a single-character console output call, and does not define any control characters. Furthermore, unlike MS-DOS there was never a dominant hardware configuration behind CP/M so going straight to hardware wasn't an option. In practice programs tended to ship with support for a ...


13

jhallen/cpm is pretty close to a compatibility layer via emulation. It runs in a terminal and maps the current CP/M drive to the current Linux directory.


13

The primary benefit of CP/M was that the applications software was written for the CP/M-80 platform, which made those applications binary compatible across the many computer systems that were compatible with the platform (notwithstanding the fact that some application vendors would create Z80-specific binaries, which naturally were NOT compatible with 8080 ...


12

TL;DR: this longish answer address the "mystic" property of the question; i.e., the sense of wonder about how this could be possible; not the actual workings of the specific components. The gory details have been given in other answers, but here is a broader outlook on the issue: Remember that in that time, computers (certainly home computers) were, ...


12

CP/M was hardware independent - there was no notion of a reference machine (as the IBM PC was for MS-DOS), so CP/M could not provide drivers. The hardware producer had to develop the drivers and deliver them with CP/M, and the driver package was simply called BIOS ("Basic Input/Output System"). This worked quite well over the lifetime of CP/M. MS-DOS ...


12

The simple answer is that they just didn't need them! Why reinvent the wheel, when the required interface is already provided by the ROM BIOS? This allows the operating system to be more portable and to support a wider variety of machines and hardware from different vendors, because the vendor provides and is responsible for the ROM BIOS routines. Size of ...


12

Possibly a simple logic trick. The slow path in addition is carry propagation (not the individual half-adders). You can thus often double the clock rate by pipelining the carry. If you pipeline the carry, then you can reuse the bit adders at the beginning of the chain, and put them at the end. Depending on the ratio between pipeline registers, reuse ...


12

You can write Zilog 80 programs and games (as I do) on the Commodore 128. I exploit Z88DK, which does the magic of booting the C128 in Zilog 80 mode. The Zilog80 at 2mhz effective speed is about as fast as a MOS6502/8502@1mhz in many situations. In some situations that depend on a bigger hardware stack, the slow Zilog80@2mhz can beat the MOS6502/8502@1mhz. ...


11

The 8080 that CP/M was originally designed for has very limited possibilities to produce code that can run anywhere in memory - Everything has to have fixed addresses. This results in the need that CP/M systems need to be recompiled for every new memory size and address map - It is convenient to do that for the system only once and not for applications that ...


11

Apologies for a non-definitive answer; while implementing a CP/M emulator for the Mac I find a fairly even split in the terminals that software available via Walnut Creek, etc, was configured for out of the box between the ADM-3a, VT-52, Hazeltine 1500 and Osborne control sets. If you're looking to do a really thorough job, I found that simple statistical ...


11

Original all three have different meanings and are (in part) based on different implementations. But, as you already assume in your answer, people may have taken the name and used it with differend (usualy simpler) implementations Is there a backstory to the catalog command The term "Catalog(ue)" goes quite in line how IBM's terminology is based on ...


11

Why did the Z80 with 4-bit ALU out-perform the fully 8-bit Intel 8080? Did it? I guess this depends on what 'performance' meant here. If it's about instructions per clock, then No. They are, for all practical purposes, identical. If it's about reaching higher clock speed, then Yes. If it's about an increased instruction set, then as well Yes. If it's about ...


10

It is said about the CPU of the MSX Turbo R, that "the R800 runs roughly like a 28.6 MHz Z80". This was a commercially available off-the-shelf machine, so should definitely count. It was a marvel in my opinion... Edit: https://en.wikipedia.org/wiki/R800_(CPU) indicates the R800 is Z80 compatible.


10

If you are looking for software and other helpful files to download, then: http://www.classiccmp.org/cpmarchives/ If you need a good primer for understanding the system, then the CP/M Primer by Mike Mantino (originally published by the StarBoard Journal of the FlagShip/StarShip SIGs) is pretty complete and also geared to the C128. If you want to show the ...


Only top voted, non community-wiki answers of a minimum length are eligible