From: korpela AT albert DOT ssl DOT berkeley DOT edu (Eric J. Korpela) Newsgroups: comp.os.msdos.djgpp Subject: Re: Porting from Watcom to DJGPP Date: 19 Sep 1996 18:16:30 GMT Organization: Cal Berkeley-- Space Sciences Lab Lines: 36 Message-ID: <51s2lu$fu4@agate.berkeley.edu> References: NNTP-Posting-Host: albert.ssl.berkeley.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article , MIKAEL BACKMAN wrote: >1. When using Watcom I declared my interrupt routines as follows : > >void (__interrupt __far __cdecl Introutine)() DJGPP has no idea what __interrupt __far and __cdecl mean. If you need to do interrupts with DJGPP you'll have to check you the FAQ > >2. In Watcom I used pragmas for inline assembly functions. > >#pragma aux func =3D \ > "shl eax,1" \ > parm caller [eax] \ > value [eax]; > In DJGPP you use extended assembly. See http://www.rt66.com/~brennan/djgpp_asm.html for a tutorial. Your function above would be... inline unsigned int func(unsigned int value) /* inline is optional */ { unsigned int retval; __asm__ ( "shll $1,%0" : "=r" (retval) /* Use any GP register for return value */ : "0" (value) /* Use same register for input value */ ); return (retval); } -- Eric Korpela | An object at rest can never be korpela AT ssl DOT berkeley DOT edu | stopped. Click here for more info.