Mail Archives: djgpp/2011/10/16/11:15:15
Hi,
On Oct 15, 11:47 am, John Wright <j DOT DOT DOT AT wacontrols DOT com> wrote:
>
> You are right sir, thanks! I know this is old material but I'm just following
> protocol and studying everything in the DJGPP archives that I can find to move
> forward with. I read something about "name mangling" but not sure than I fully
> understand the term right now. I'll go back and read review again. I'm using
> NASM v2.10, not sure about the rc4.
> Should I apply any patches 2.03? Do they even exist? It seems like I have seen
> some mention of this.
Dunno. 2.03p2 is "stable" (recommended by Zip Picker), but I
personally use 2.04 if possible. I don't know if DJGPP's CVS still
accepts patches to 2.03. (There are only a handful of committers
anyways.) Juan or DJ would know more than I do (naturally).
> Questions:
>
> 1. What does name mangling apply to the most? NASM/assembly, C++, or both?
C++, mostly. That's why it's easiest to just say 'extern "C" { ... }'.
BTW, COFF (e.g. DJGPP or Win32) put a '_' before the function name,
but ELF (Linux) doesn't. NASM (and YASM) support --prefix for that
reason.
> 2. Running DJgpp and NASM on a XP machine (dos window). I assume dos versions
> of NASM okay.
Yes, NTVDM runs it fine (thanks to CWS).
> Where does Win32 version come into play? I'm going to assume
> windows API related windows application programming?
No, because NASM can cross-assemble for any target with the DOS-hosted
version too. The Win32-hosted version is really only good for Win32 or
moreso Win64 (which doesn't support NTVDM). The default binaries on
http://www.nasm.us these days use MinGW, which uses MSVCRT.DLL
(blech). But you can recompile with OpenWatcom "-bcl=nt" and then
it'll run under DOS with either HX or WDOSX. (At least with HX you can
use LFNs, unlike native DOS build.)
P.S. I'm a little sheepish mentioning this wimpy hack, but maybe it'll
help (C++ w/ NASM, though admittedly only using 'extern "C" { ... }',
as mentioned previously):
http://sites.google.com/site/rugxulo/paq8o8z-Jan13-lite.tgz?attredirects=0
- Raw text -