delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/17/22:58:40

From: Matthew Mastracci <mmastrac AT acs DOT ucalgary DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: NASM w/DJGPP
Date: Fri, 17 Jan 1997 16:15:37 -0700
Organization: The University of Calgary
Lines: 29
Message-ID: <Pine.A41.3.94.970117160732.73886D-100000@acs2.acs.ucalgary.ca>
NNTP-Posting-Host: mmastrac AT acs2 DOT acs DOT ucalgary DOT ca
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

     I downloaded the newest version of NASM from the project's homepage
(http://www.dcs.warwick.ac.uk/~jules/nasm1.html) and I was really
impressed with how well it worked with DJGPP.  There are a few syntax
changes from regular MASM to NASM-format, but none of them we major enough
to cause me any trouble.  One problem with the docs & examples in relation
to DJGPP: they don't mention that the DJGPP linker looks for postfixes to
all function calls, indicating what their arguments are.  For example: 

C-definition: extern void greet(void)
NASM-function: _greet__Fv

C-definition: extern int addfour(unsigned char, unsigned int, int, char)
NASM-function: _addfour__FUcUiic

If you're ever in doubt, just check the compiled source to your program
and see what the linker will look for.

BTW, to get the example program to work, just add "__Fv" to the ends of
the functions in the assembler source.

Is there any way to change the linker's behavior (so it doesn't require
these postfixes)?  

/\/\att /\/\astracci                  mmastrac AT acs DOT ucalgary DOT ca

GCS/GE    d- s+:+ a--- C++++ UA P+ L E-- W+ N++ o K+ w+ O M- V 
          PS++ PE++ Y+ PGP t+++ 5+++ X++ R++ tv+ b+++ DI++++ I 
          G++ e h r* z?

- Raw text -


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