Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!ulowell!cbmvax!bryce From: bryce@cbmvax.UUCP (Bryce Nesbitt) Newsgroups: comp.sys.amiga.tech Subject: Re: New RKM:AutoDocs & Includes MAJOR problem! Keywords: RKM, parameter type, Manx, WARNING Will Robinson! Message-ID: <6196@cbmvax.UUCP> Date: 9 Mar 89 19:44:46 GMT References: <1467@percival.UUCP> Reply-To: bryce@cbmvax.UUCP (Bryce Nesbitt) Organization: Commodore Technology, West Chester, PA Lines: 35 In article <1467@percival.UUCP> baer@percival.UUCP (Ken Baer) writes: | |HOWEVER, to my dismay, I discovered that the |type sizes are WRONG! No, the manual is correct. The confusion lies with your compiler. |Those of us who use Manx C, know that when you |pass an integer to an Amiga system function (like Draw()), you have to |cast it to LONG (or it must me LONG in the first place). But, in the new |RKM, these variables are listed as SHORT!! Not as LONG! I guarentee (sic) |that if you call Draw(rp, (SHORT)x, (SHORT)y) you'll either go somewhere |wierd (sic), or crash horribly. The ROM INTERFACE will accept a SHORT, as documented: Draw(rp, x, y) a0 d0:16 d1:16 SHORT x,y; The d0:16 and d1:16 indicate that 16 bit values are allowed in the registers. "SHORT" is the proper type. However the Manx "C to ROM stubs" insist on a long. We could SAY that the function needs a long, but that would deny compilers the opportunity to take advantage of short arithmetic. Your compiler documentation should have made this point clear. -- |\_/| . ACK!, NAK!, EOT!, SOH! {O o} . Bryce Nesbitt, Commodore-Amiga, Inc. (") BIX: bnesbitt U USENET: cbmvax!bryce@uunet.uu.NET -or- rutgers!cbmvax!bryce Lawyers: America's untapped export market.