Needed: A (Portable) way of setting up the arg stack

Peter Desnoyers desnoyer at Apple.COM
Tue Jun 6 03:12:46 AEST 1989


In article <11830 at bloom-beacon.MIT.EDU> scs at adam.pika.mit.edu (Steve Summit) writes:
> [routine called va_call that takes a function pointer, an argument
> count, and an array of arguments]
>
>va_call can be implemented in one line of assembly language...
>A routine such as va_call MUST be written in assembly language; it
>is one of the handful of functions I know of that cannot possibly
>be written in C.

Almost correct. In Turbo C there are pseudo-variables for the stack
pointer, etc.  You can also access these registers (warning -
approaching gross kludge) by doing a setjmp and knowing the jmp_buf
format. 

				Peter Desnoyers



More information about the Comp.lang.c mailing list