🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: DICE

#3786
From: Randell Jesup
Date: Wed, 06 Jun 1990 04:52
40 lines
2118 bytes
In article <MWM.90Jun1135302@raven.pa.dec.com> mwm@raven.pa.dec.com (Mike (Real Amigas have keyboard garages) Meyer) writes:
>In article <dillon.4040@overload.UUCP> dillon@overload.UUCP (Matthew Dillon) writes:
>
>       DICE does not have registerized parameters or inline library calls.
>       Frankly, anybody who appreciates such options also knows that simply
>       optimizing one or two of his core routines will get better results
>       anyway and these so called features only make the code less portable
>       and more unreadable :-).

	I find them QUITE useful.  In fact, I'd guess dos would be at least
10-15+% bigger without them, and slower.

>The
>only portability hit is having to provide/disable prototypes for
>functions that want registerized parameters. Since I like prototypes
>anyway, that's no big deal. More importantly, done right, they makes
>doing shared libraries somewhat saner.

	Everyone should use prototypes.

	Here's a useful set of defines if you need to switch back and forth,
and perhaps to improve readability:

#define ASM __asm
#define REG(x) register __ ## x
#define REGARGS __regargs

'##' is the ANSI token-pasting operator.  You would declare functions like
this:

long ASM foo (REG(d0) long mylong, REG(a0) struct bar *foobar);
 or
long REGARGS foo (long mylong, struct bar *foobar);

When you don't want registerized params, just define them to nothing.

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
Common phrase heard at Amiga Devcon '89: "It's in there!"
Technical Details
Message-ID: <12344@cbmvax.commodore.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!bpa!cbmvax!jesup
References: <9005290344.AA10362@thunder.LakeheadU.Ca> <dillon.4040@overload.UUCP> <MWM.90Jun1135302@raven.pa.dec.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!bpa!cbmvax!jesup
From: jesup@cbmvax.commodore.com (Randell Jesup)
Newsgroups: comp.sys.amiga.tech
Subject: Re: DICE
Message-ID: <12344@cbmvax.commodore.com>
Date: 6 Jun 90 04:52:08 GMT
References: <9005290344.AA10362@thunder.LakeheadU.Ca> <dillon.4040@overload.UUCP> <MWM.90Jun1135302@raven.pa.dec.com>
Reply-To: jesup@cbmvax (Randell Jesup)
Organization: Commodore, West Chester, PA
Lines: 40