delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/09/19/08:06:43

Date: Thu, 19 Sep 1996 13:45:02 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: MIKAEL BACKMAN <di95mba AT student DOT hk-r DOT se>
Cc: djgpp AT delorie DOT com
Subject: Re: Porting from Watcom to DJGPP
In-Reply-To: <Pine.SOL.3.95.960919093325.3454B-100000@columbia>
Message-Id: <Pine.SUN.3.91.960919133325.4286E-100000@is>
Mime-Version: 1.0

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019