🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #3479

Re: gadgets in 2.0

#3479
From: Dave Schaumann
Date: Sun, 06 May 1990 22:32
30 lines
1775 bytes
In article <1990May6.183020.17956@calgary.uucp>, pepers@enme3.ucalgary.ca (Brad Pepers) writes:
<
<The calling convention of [gadget] functions was something like:
<
<     funcion(param1,param2,...,paramN,tag1,val1,tag2,val2,....);
<
<Where param? are necessary params and the rest are tag/value combinations
<with no particular type or number of them.
<
<My problem is this: while this is ok for C (but you don't get type checking
<and "safe" things like that) its not ok for most other languages.
>
<[...]
<
<Why couldn't the gadget routines take a pointer to a variable length 2D
<array with tag,value pairs? This would be supportable in all languages.
<
Why not write a 'glue' routine in asm to do just that?  It would take a list
as you suggested and create the appropriate stack frame as required by the
gadget routine being called.  You could even (assuming you have function/
procedure parameters in your language) create a single generic function
that would take a function name and a parameter list, create the stack frame,
and call the passed function.  Of course, you would probably want to add some
error checking capabilities...
<
<    Brad Pepers

Dave Schaumann		| "Strange women lying in ponds distributing swords
dave@cs.arizona.edu	|  is no basis for a system of government!"
FidoNet: 1/300/4	| 		-M. Python
Technical Details
Message-ID: <293@caslon.cs.arizona.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!asuvax!noao!arizona!dave
References: <1990May6.183020.17956@calgary.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!asuvax!noao!arizona!dave
From: dave@cs.arizona.edu (Dave Schaumann)
Newsgroups: comp.sys.amiga.tech
Subject: Re: gadgets in 2.0
Keywords: gadgets 2.0
Message-ID: <293@caslon.cs.arizona.edu>
Date: 6 May 90 22:32:26 GMT
References: <1990May6.183020.17956@calgary.uucp>
Organization: U of Arizona CS Dept, Tucson
Lines: 30