Date: Thu, 19 Sep 1996 13:45:02 +0200 (IST) From: Eli Zaretskii To: MIKAEL BACKMAN Cc: djgpp AT delorie DOT com Subject: Re: Porting from Watcom to DJGPP In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 19 Sep 1996, MIKAEL BACKMAN wrote: > void (__interrupt __far __cdecl Introutine)() > > This won't work with DJGPP, I get a parse error from the compiler. > > *** How do I overcome this problem ? Get the DJGPP FAQ list and read sections 18.9 - 18.11 there. The latest release of the FAQ is available as v2/faq201b.zip from the same place you get DJGPP. > 2. In Watcom I used pragmas for inline assembly functions. > > #pragma aux func = \ > "shl eax,1" \ > parm caller [eax] \ > value [eax]; This is very different in DJGPP. You will have to learn new (and very powerful) inline assembly facilities of GCC and the AT&T assembly syntax. Consider to rewrite these snippets in C before you plunge into these issues. Here are some pointers to docs, in case you decide to use DJGPP inline assembly anyway: - FAQ, sections 17.1 - 17.4 - A guide written by Brennan Underwood which describes how to use inline assembly programming with DJGPP, at this URL: http://www.rt66.com/~brennan/djgpp/djgpp_asm.html - A description of the inline assembly facilities of GCC in the on-line docs. Type from the DOS prompt: info gcc "C Extensions" "Extended Asm" (the letter case and the quotes are important). I also suggest you read Chapter 18 of the FAQ in its entirety, since the original programs seem to use low-level programming aspects intensively, and most of them is different under DJGPP.