ZEUS!! Re: var args - (nf)

Michael A. Bloom mab at bnl.UUCP
Fri Nov 4 13:49:36 AEST 1983


        The only time that this wouldn't work is if the arguments were put on
        the stack in the reverse order that they normally are in C.

        			Ken Turkowski
    Unfortunatly, there is at least one compiler out there that does this.
    Printf for this compiler is interesting (and broken) (and sickening).

Then, there is the ZILOG compiler for ZEUS (ZILOG Extended Unix System)
Arguments are passed in REGISTERS until they run out,  at which point
the stack is then used for the remainder of the arguments.  Printf for
this requires knowing what registers the compiler will use in what
order for what argument types, and when it will stop using registers
and start using the stack.  To top this they have two versions  of the
compiler,  one of which generates segmented addresses (32 bits) and
one which generates unsegmented addresses (16 bits).  Int is 16 bits
for both compilers, but sizeof (* anything) is 32 bits on one and
16 on the other.  There are also two different ld's, ld(1) and sld(1).


			Michael Bloom
			..!ucla-vax!sdcrdcf!csun!mab (preferred to above)



More information about the Comp.lang.c mailing list