Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!linus!genrad!decvax!harpo!floyd!vax135!cornell!uw-beaver!tektronix!tekecs!orca!andrew
From: andrew@orca.UUCP
Newsgroups: net.micro.cpm
Subject: Re: need information on Aztec C
Message-ID: <1333@orca.UUCP>
Date: Sat, 25-Jun-83 13:32:38 EDT
Article-I.D.: orca.1333
Posted: Sat Jun 25 13:32:38 1983
Date-Received: Mon, 27-Jun-83 18:52:09 EDT
Lines: 24

In his otherwise excellent description of Aztec C, Michael C. Adler
stated:

	You should also note that it supports a Z80 mode that allows register
	variables (8080 version syntax permits register vars. but stores them
	in memory).

In fact, the first register var in the 8080 version is allocated to the
"BC" register pair.  This provides impressive gains in code space and
execution speed.

It is true that the Z80 version gives you a total of three registers
(BC, IX, and IY), but non-recursive routines always win by using static
allocation in place of IX/IY.  This is because every access to an IX/IY
register is done via "PUSH IX; POP HL", and every access to a static
word is done by "LD HL,(WORD)".  Each sequence takes three bytes, but
the IX access requires more cycles than the static access.

Of course, "auto" allocation is the biggest lose (it results in
"LD HL,OFFSET; ADD HL,SP; LD E,(HL); INC HL; LD D,(HL); EX DE,HL"), which
is why IX/IY win for recursion.

  -- Andrew Klossner   (decvax!teklabs!tekecs!andrew)  [UUCP]
                       (andrew.tektronix@rand-relay)   [ARPA]