Hot answers tagged

40

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


35

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


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

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


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

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


23

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


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


20

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


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


17

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


16

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


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

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

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


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


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


10

Gaby's CP/M Homepage, as well as her copy of The Unofficial CP/M Web site might be an excelent start - at least if you want to dive deep into the internals :)


10

There are numerous Z80 simulators out there. The Z80 simulator community is robust and mature. Z80Pack is a solid first one stop shopping place to get started, but there are lots of others.


10

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


10

M-BASIC-80 knows the modifier "A" for the SAVE command - So, you should be able to create a readable ASCII file directly on the Kaypro computer by doing LOAD "MYPROG.BAS" LIST SAVE "MYPROG.TXT",A If you don't want to mess with old disks on a modern computer (I recommend you don't even start to look into this), your best bet would be to set up a serial RS-...


9

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.


9

Back in 1995, I used to work on satellite on-board-systems that were typically powered by a number of 1MHz Z80 forming what you would today call a multi-core CPU. The Z80 communicated through shared memory segments and worked out complex fixed-point calculation for earth observation, radar range measurement, and general telemetry. While these were not ...


9

The sticking point: IBM wanted to pay a flat $200,000 license fee to get a royalty-free license in perpetuity. Kildall wanted more. Bill Gates came up with a similar operating system. He gave DOS away to IBM for $50,000 and figured, correctly, that he could get rich by licensing the system to other computer manufacturers.[1] Now, earlier in ...


9

CPM 2.2, the most widely used and generally the progenitor of MS-DOS, supported only a few predefined devices via its BIOS. These were: console input and output a listing device (printer) output a punch (presumable paper tape) output a reader (also paper tape) input various calls to control a mass storage device (floppy disk) and that was that. No ...


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