From: Joseph Rose Newsgroups: comp.os.msdos.djgpp Subject: Re: __stdcall and fastcall in DJGPP? Date: Sun, 30 Apr 2000 18:43:28 -0400 Organization: Posted via Supernews, http://www.supernews.com Lines: 26 Message-ID: <390CB710.8CDF5339@pop.gis.net> References: <390CB120 DOT 89612A6D AT pop DOT gis DOT net> <390cafee DOT 47722636 AT news DOT freeserve DOT net> X-Complaints-To: newsabuse AT supernews DOT com X-Mailer: Mozilla 4.7 [en]C-NECCK (Win98; I) X-Accept-Language: en MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com What's "profiling"? Also, the routine in question, Draw_Line_HorizHere, uses DS:EDI for the position of the line and ECX for the length. Any other routine which might use the registers will be designed to interface with other asm routines and probably use the registers a certain way (AL=color/Value, EDI=destination, ECX=Length/X/Some kind of factor, EDX=Y, etc.) Steamer wrote: > Joseph Rose wrote: > > >Also, how does fastcall work in DJGPP/DOS? I have a few functions that > >use the registers for the parameters. > > You have a prototype like this: > > int foo(int arg1, int arg2) __attribute__ ((regparm(n))); > > where n = 1, 2 or 3 (the number of parameters passed in registers). > > Uses EAX, EDX and ECX (probably in that order, but you should check). > > You can't use this while profiling, however. > > S.