delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/01/20:00:40

From: JeLlyFish DOT software AT gmx DOT net (Vinzent Hoefler)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: NASM and DJGPP
Date: Sun, 01 Aug 1999 23:52:46 GMT
Organization: JeLlyFish software
Lines: 29
Message-ID: <7o2ml4$77a$3@news07.btx.dtag.de>
References: <37a4c508 DOT 6098595 AT news DOT freenet DOT co DOT uk>
Mime-Version: 1.0
X-Trace: news07.btx.dtag.de 933551588 7402 777000109768-0001 990801 23:53:08
X-Complaints-To: abuse AT t-online DOT de
X-Sender: 777000109768-0001 AT t-online DOT de
X-Newsreader: Forte Free Agent 1.11/16.235
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

tpsi_uk AT freenet DOT co DOT uk (Lee Westlake) wrote:

>Over the years, I have generated many assembly routines which my DJGPP
>programs would benefit from.  However, I can't seem to find a way to
>link both C and assembler objects together in order to produce a
>complete EXE.

Create an .o file with NASM and place it on the command line together
with your C/other .o file(s).

In a makefile you would write

-8<-

asm.o: asm.asm
	nasm -f coff asm.asm

test.exe: test.c asm.o
	gcc test.c asm.o -o test.exe

-8<-

or something similar.

Just list all objects you need in the final command line.


Vinzent.

- Raw text -


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