Article View: comp.lang.c.moderated
Article #2216Re: Variable param for non-vararg subr. calls
From: HASDI RODZMANN HASHIM
Date: Fri, 08 Mar 1996 23:05
Date: Fri, 08 Mar 1996 23:05
25 lines
1265 bytes
1265 bytes
Jens M Andreasen (jens-and@dsv.su.se) wrote:
[SNIP!]
Hey Jens,
I too been trying to work this problem out. I guess the saner way
is less portable. Assume that....
1. the paramaters get pushed right to left
2. nobody bothers pushing an entire structure on the stack.
(pointers to a structure is more common:)
myptr = mark();
pushi(20);
pushp("World");
pushp("Hello %s(%i).\n");
call(printf);
release(myptr);
mark,pushp,pushi,call and release are platform/hardware dependent assembly
macros. works for me, at least for GNU compilers. Separate their
implementation in another file to make it neat. :)
Cheers!
Hasdi
Technical Details
Message-ID:
<4hqeg2$1pl@solutions.solon.com>Path:
arc1-ca.pugleaf.net!solon.com!not-for-mailReferences:
<199603012002.MAA04513@elf.bsdi.com> <4h9mjl$grs@solutions.solon.com> <4ha84e$js1@solutions.solon.com> <4hdqp2$8sr@solutions.solon.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail From: hasdi@engin.umich.edu (HASDI RODZMANN HASHIM) Newsgroups: comp.lang.c.moderated Subject: Re: Variable param for non-vararg subr. calls Date: 8 Mar 1996 17:05:38 -0600 Organization: University of Michigan Engineering, Ann Arbor Sender: clc@solutions.solon.com Approved: clc@solutions.solon.com Message-ID: <4hqeg2$1pl@solutions.solon.com> References: <199603012002.MAA04513@elf.bsdi.com> <4h9mjl$grs@solutions.solon.com> <4ha84e$js1@solutions.solon.com> <4hdqp2$8sr@solutions.solon.com> NNTP-Posting-Host: solutions.solon.com X-Newsreader: TIN [version 1.2 PL2]