delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/08/13:25:49

Date: Wed, 8 Sep 1999 16:20:01 +0200
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Message-Id: <199909081420.QAA08245@acp3bf.physik.rwth-aachen.de>
To: djgpp AT delorie DOT com
Subject: Re: ASM dans DJGPP [question in english)
Newsgroups: comp.os.msdos.djgpp
Organization: RWTH Aachen, III. physikalisches Institut B
X-Newsreader: TIN [version 1.2 PL2]
Reply-To: djgpp AT delorie DOT com

In article <001f01bef9df$06705180$21d5fac1 AT mathieu-laroye> you wrote:

> Thank you for the answer which already reached me. With DJGPP one can use
> the ASM but it is difficult. I prefere to use Nasm which is easier. But I
> does not know how to make so that DJGPP compiles my commands ASM with Nasm
> and not its assembler interns (Gasm)

gcc will never call NASM. At least none of the standard versions of
gcc available as part of the DJGPP project will. This is the reason
why you cannot use NASM-style assembly for inline assembly routines
embedded in the C source.

To compile assembly source code written for NASM, you'll have to call
'nasm' yourself. It's up to you wether you do it from a Makefile, or
let your integrated development environment of choice do it for you.

I.e. for a program consisting of a C source file 'foo.c' and a NASM
assembly module 'bar.asm', you'ld first compile everything to .o files:

	nasm bar.asm -o bar.o    
	gcc -c foo.c

and then link it all together to build the final program:

	gcc foo.o bar.o -o program.exe

(The nasm invocation options are probably wrong, I've never used it
enough myself to remember its usage).

--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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