delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2011/10/13/06:45:16

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Rod Pemberton" <do_not_have AT noavailemail DOT cmm>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: DJGPP and NASM Versions?
Date: Thu, 13 Oct 2011 06:24:28 -0400
Organization: Aioe.org NNTP Server
Lines: 72
Message-ID: <j76e86$kjl$1@speranza.aioe.org>
References: <201110121716 DOT 44156 DOT john AT wacontrols DOT com>
NNTP-Posting-Host: qBjb0U1QTH77eiTXJSCpEw.user.speranza.aioe.org
X-Complaints-To: abuse AT aioe DOT org
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.2001
X-Notice: Filtered by postfilter v. 0.8.2
X-Newsreader: Microsoft Outlook Express 6.00.2800.2001
X-Priority: 3
X-MSMail-Priority: Normal
Bytes: 3292
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"John Wright" <john AT wacontrols DOT com> wrote in message
news:201110121716 DOT 44156 DOT john AT wacontrols DOT com...
>
> 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?
>

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


- Raw text -


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