[net.lang.c] <varargs.h> and the PERQ

robert@cheviot.UUCP (Robert Stroud) (12/18/84)

<This line is a figment of your imagination>

According to Henry Spencer @ U of Toronto Zoology

> ...     there are some misguided "high-level-language" machines --
> the PERQ is an example -- which ...
> ... *insist* on knowing how big the arglist is
> for a given function, have it figuring in the calling sequence to the
> point where you can't lie without disaster, and insist that the number
> be a constant for each function.

> There exist machines on which <varargs.h> is unimplementable.

> The PERQ, on which the parameter list of a function must have a constant
> length, the same length for all calls.

My PERQ has been microcoded as a C machine (rather than a Pascal machine)
and runs a version of Unix called PNX = Version 7 + Window Manager + some
System III utilities and system calls.

<varargs.h> is supplied and seems to work perfectly. The CALLING function
pushes the arguments onto the stack; the CALLED function just grabs them
and doesn't care how many there are.

Sounds to me like whoever tried to implement C and Unix on top of an
inappropriate (microcoded) architecture was misguided (:-)

Robert J Stroud,
University of Newcastle upon Tyne.

..!ukc!cheviot!robert

henry@utzoo.UUCP (Henry Spencer) (12/20/84)

> > There exist machines on which <varargs.h> is unimplementable.
> 
> > The PERQ, on which the parameter list of a function must have a constant
> > length, the same length for all calls.
> 
> My PERQ has been microcoded as a C machine (rather than a Pascal machine)
> and runs a version of Unix called PNX = Version 7 + Window Manager + some
> System III utilities and system calls.
> 
> <varargs.h> is supplied and seems to work perfectly...

Not all of us are free to change the microcode when we don't like it...
That option wasn't available to those of us who did early Perq compiler
work, for political reasons.  We all recognized the desirability of it,
but it was beyond our mandates.  I'm glad to hear that somebody had the
clout to declare compatibility a non-issue; I wish that was possible more
often.

I shouldn't complain; I got an M.Sc. thesis out of investigating the
problems that arose...
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry