Article View: comp.sys.amiga.tech
Article #11206Re: InitBitMap() arguments
From: Randell Jesup
Date: Fri, 27 Jan 1989 19:32
Date: Fri, 27 Jan 1989 19:32
21 lines
1601 bytes
1601 bytes
In article <4218@hubcap.UUCP> rchampe@hubcap.UUCP (Richard Champeaux) writes:
>When I ran a program I've been working on through Lint,
>it told me that the arguments I was passing to InitBitMap() were shorts
>instead of longs, which manx.l claims they should be. Just to be sure,
>I looked InitBitMap up in the disk based RKM, it said that depth is a
>BYTE, and width and height are SHORT.
> Which is correct? manx.l or the RKM? When I was compiling with +L
>it didn't matter because everything gets type cast to a 32 bit int when
>they're passed to functions. But if I compile without the +L, the wrong
>type will cause all kinds of Hell.
All system functions linked with the commodore supplied amiga.lib
require longs be passed on the stack. All library functions (that we wrote)
require parameters in registers. We may only use part of the register,
as in the case you gave of InitBitMap, in which case it will be listed in
the RKM as SHORT (obsolete, replace with WORD) or BYTE, etc. I don't
know whether manx's stubs are our stubs, but I think they are the same.
I'd test it if I were you.
--
Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup
Technical Details
Message-ID:
<5839@cbmvax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!ulowell!cbmvax!jesupReferences:
<4218@hubcap.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!ulowell!cbmvax!jesup From: jesup@cbmvax.UUCP (Randell Jesup) Newsgroups: comp.sys.amiga.tech Subject: Re: InitBitMap() arguments Message-ID: <5839@cbmvax.UUCP> Date: 27 Jan 89 19:32:03 GMT References: <4218@hubcap.UUCP> Reply-To: jesup@cbmvax.UUCP (Randell Jesup) Organization: Commodore Technology, West Chester, PA Lines: 21