Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!bellcore!texbell!killer!elg From: elg@killer.Dallas.TX.US (Eric Green) Newsgroups: comp.sys.cbm Subject: Re: C128,C128D, and C128C??? Questions Message-ID: <7606@killer.Dallas.TX.US> Date: 22 Mar 89 01:42:42 GMT References: <89Mar20.194245est.2737@godzilla.eecg.toronto.edu> Organization: The Unix(R) Connection, Dallas, Texas Lines: 49 in article <89Mar20.194245est.2737@godzilla.eecg.toronto.edu>, leblanc@eecg.toronto.edu (Marcel LeBlanc) says: > > 2Mhz 6502 is (almost) 4 times faster than a 2Mhz Z80. This is because > memory (or IO) accesses on a Z80 take 3-4 cycles, whereas the same operation > on a 6502 takes only one cycle (yes, the 6502 was an early RISC :-) ). So > even if you could get the Z80 to run flat out at 4MHz, it would still be > only a little more than half the speed of the 8502 at 2MHz. But then, I > guess CP/M can use all the speed it can get... Actually, it's not that simple. Yes, memory access takes 4 cycles on the Z-80, making actual data fetch of a 4mhz Z-80 about the same as a 1mhz 6502. But the Z-80 has 16-bit registers, and has a LOT of registers (at least, when compared to having a whole 3 8-bit registers!) This means that you don't have to go to memory as often, and can more easily do 16-bit arithmetic and do 16-bit indirect addressing. This is one reason you'll find better, e.g., Pascal compilers on a CP/M machine, than on a C-64. I've used Turbo Pascal on a CP/M machine, and it makes any Pascal on the 64 look sad, insofar as code size & speed is concerned. Same with BDS "C" vs. Power C. I don't have a Z-80 manual lying around (I'm not ancient enough ;-), but I also suspect that a 4mhz Z-80 takes less time for internal processing than a 1mhz 6502. e.g. moving B to A may require less time than moving .X to .A on 6502. I explored the 128's CP/M mode some time ago, right after getting my 1750 (it wasn't worth it with a 1571 and a 1541 as the only two of my drives that it'd access). There are text editors under CP/M that make anything under 128 or 64 mode look pitiful. Not to mention that you can probably still get pirate copies of DBASE and WORDSTAR ;-). Unfortunately, screen update is MUCH too slow for it to be useful. There seems to have been a design decision, somewhere in the software cycle, to switch into 6502 mode and use the Kernal for all I/O. I suspect this is responsible for the drastic slow-down... if the Z-80 was handling all its own screen and modem i/o, that'd solve the two biggest problems of the 128's CP/M mode. (and, BTW, there is a program available to turn off the 40 column screen -- it does speed up compute-bound programs, but does little to speed up slow I/O operations). I solved the screen i/o problem by buying an Amiga ;-). But if anybody out there has any CP/M experience, I'd be quite interested in seeing the results of a hacked CP/M that did its own screen i/o instead of punting to the 6502.... -- | // Eric Lee Green P.O. Box 92191, Lafayette, LA 70509 | | // ..!{ames,decwrl,mit-eddie,osu-cis}!killer!elg (318)989-9849 | | \X/ Amiga. The homestation for the blessed of us. |