Mail Archives: djgpp/2011/10/15/12:47:31
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.
Questions:
1. What does name mangling apply to the most? NASM/assembly, C++, or both?
2. Running DJgpp and NASM on a XP machine (dos window). I assume dos versions
of NASM okay. Where does Win32 version come into play? I'm going to assume
windows API related windows application programming?
Thanks for your help.
---------------------------------------------------------------
I don't believe so. I never heard of DJNASMEX. Google found it on one site
and Yahoo on another. As is, it didn't compile for me. It seems the author
set it up for C++. That has "mangled" the names. Someone else here might
know how to get it to compile for C++, but with a few simple changes it'll
compile for C. (This is in the README, but I didn't read that at first.) I
compiled with DJGPP v2.03 and v2.04. I assembled with NASM v0.98.39 and
v2.10rc4, both for DOS. The compiled applications seem to work. Below is a
change list. I didn't include the line numbers. The files are small and
the lines should be easy to fix in a text editor. I also didn't supply a
patch file, since you probably are unfamiliar with it. If you don't
understand something below, ask. If you've already done the following
changes, and it's still not compiling, then maybe you have an issue with
DJGPP.
ren *.cc *.c
edit makeall.bat
replace all .cc with .c and save
edit nasmtest.asm
remove __Fui from all _AddFour__Fui
remove __Fc from all _NewVersion__Fc
remove __Fv from all _PrintStrings__Fv
edit bignum.asm
remove __FUiUi from all _BigNum__FUiUi
edit alloctst.asm
remove __FPc from all _FillString__FPc
edit inttest.asm
remove __Fv from all _InitGraphics__Fv
remove __Fv from all _InitMode13h__Fv
remove __FUiUiUc from all _PutPixel__FUiUiUc
remove __Fv from all _RestoreTextMode__Fv
remove ALIGN=4 from [SECTION .text ALIGN=4]
remove ALIGN=4 from [SECTION .data ALIGN=4]
edit hookint.asm
remove __Fv from all _TichHandler__Fv
remove ALIGN=4 from [SECTION .text ALIGN=4]
edit rmcbtest.asm
remove ALIGN=4 from [SECTION .text ALIGN=4]
remove ALIGN=4 from [SECTION .data ALIGN=4]
edit rmcbtest.c
remove "C" from extern "C" void MouseCallback(_go32_dpmi_registers * r);
makeall
HTH,
Rod Pemberton
> I am trying to learn assembly and attempted to compile the examples in
> DJNASMEX.zip. I'm getting link errors on most of the examples. I think
> I've got DJdev and Nasm version issue. I installed the latest NASM dos
> version from the Netwide site. I'm running DJdev 2.03 with no patches
> or updates. Do I need to do some updating ?
>
> I'm getting good .o file creation but Ld is failing. The exception was the
> At&t.exe which I assume is a GAS example. Haven't studied the source yet.
>
> So, do I need to update DJdev?
>
- Raw text -