old processor architectures [was Re: The Strange Birth and Long Life of Unix - IEEE Spectrum]

Mel Wilson mwilson-4YeSL8/OYKRWk0Htik3J/w at public.gmane.org
Thu Dec 8 18:10:49 UTC 2011


On 12/08/2011 11:05 AM, D. Hugh Redelmeier wrote:
> | From: Scott Allen<mlxxxp-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>
>
> | Indexing was one of the big features that the Z80 added.
>
> Yes, but if you looked at the actual bytes of generated code, it
> didn't often make your code much faster or shorter.  I had z80s but
> didn't find it worthwhile to use any of the added instructions.
Granted, any code snippet using an X along with the other regs could be 
replaced by an equivalent snippet using HL and DE, and probably be 
smaller and faster.  We had two big applications, though, where common 
code was augmented by big tables of structs with configuration info for 
the installation.  We wrote the common data-processing routines for most 
efficient use of the vanilla 8080 registers, and pulled in the custom 
arguments via IX/IY pointers as needed.  Trying this without IX and IY 
would have driven us all mad.
> Even the block move instructions weren't much faster than a loop: they
> refetched the instruction for each byte!
Probably so that long strings of byte moves could be interrupted.  Even 
so, you verge on the unfair, I think.  LDIR took 21 clocks per byte, a 
naive loop for the same thing can take 42, and clobber the A register.

Boy.  Haven't thought about this stuff in a long time.

     Mel.

--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list