X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Rugxulo Newsgroups: comp.os.msdos.djgpp Subject: Re: DJGPP and NASM Versions? Date: Sun, 16 Oct 2011 07:49:27 -0700 (PDT) Organization: http://groups.google.com Lines: 55 Message-ID: <6ebfd039-cd60-45c1-980d-7d0ff0171a0b@s14g2000vbj.googlegroups.com> References: <201110140405 DOT p9E451fW019735 AT delorie DOT com> <201110151147 DOT 02064 DOT john AT wacontrols DOT com> NNTP-Posting-Host: 65.13.115.246 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1318776702 19781 127.0.0.1 (16 Oct 2011 14:51:42 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Sun, 16 Oct 2011 14:51:42 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: s14g2000vbj.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20100101 Firefox/7.0.1,gzip(gfe) Bytes: 3341 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id p9GFF2du007203 Reply-To: djgpp AT delorie DOT com Hi, On Oct 15, 11:47 am, John Wright 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