www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/02/16/12:03:21

To: huntercr AT cs DOT purdue DOT edu (Charles Hunter)
Cc: DJGPP AT sun DOT soe DOT clarkson DOT edu (djgpp mailing list)
Subject: Re: mixed mode programming...
Date: Thu, 16 Feb 95 18:01:27 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>

> I have a few old real mode C libraries , and some real mode asm and
> protected mode asm objs/src ... etc.
>
> Does anyone have any tips on how I could go about linking any combination of
> these to djgpp compiled sources? I have not tried any of this yet, because

Did you consider to read the FAQ list?  You can download it as
faq100.zip from the same place you've got DJGPP.  An excerpt:

17.1  Q: I have some code written in assembly which compiles under MASM
         and TASM, but gcc gives me a long list of error messages.
      A: The GNU Assembler (as.exe) called by gcc accepts AT&T syntax
         which is different from Intel syntax.  Notable differences
         between the two syntaxes are:

           * AT&T immediate operands are preceded by `$'; Intel immediate
             operands are undelimited (Intel `push 4' is AT&T `pushl $4').
             AT&T register operands are preceded by `%'; Intel register
             operands are undelimited.  AT&T absolute (as opposed to PC
             relative) jump/call operands are prefixed by `*'; they are
             undelimited in Intel syntax.

[more stuff deleted]

17.2  Q: Where can I find an automated conversion tool to convert my
         Intel-style assembly code into a code acceptable by Gas?

[snip]

17.3  Q: OK, I've succeeded to convert and compile my assembly-language
         program, but when I run it, I get Segmentation Violation and
         General Protection Faults.  This program works when compiled with
         MASM, so how can it be?

[snip]

It goes on and on.  Are you intrigued enough to read the FAQ?  Then
my job is half-done (the other half depends on whether I succeeded
to answer those questions in the FAQ).  Your comments on the FAQ
contents are welcome.

- Raw text -


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