Computing.Net > Forums > Programming > ASM programing (80x86) Linker error

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

ASM programing (80x86) Linker error

Reply to Message Icon

Name: Kelly
Date: April 25, 2002 at 14:47:22 Pacific
Comment:

I run a win98 SE operating system, at 133MHz with 32 Megs of RAM. I am learning assembly with MASM, upon trying to assemble a hello world program, i recieved the following linker error:

error Segment refernce in fixup record hello.obj: fatal error LNK1123: failure during conversion to COFF: file invalid or corupt.

Please can anyone help explain what is going on and how i can fix it? For more details see below:

Hello, I decided to take the plunge and learn assembly language. I found several good ASM tutorials on the net. Upon copying and pasteing the code for the clasic hello world program writen in assembly, i saved the file as hello.asm in text format (ASCII).
I then after half hour, found a download for MASM, from the Driver Development Kit on the Microsoft web site, I downloaded Bins_ddk.exe and 98setup.exe from the microsoft web server. I then executed both files and extracted them to c:\ddk then i opened that folder and executed setup.exe as instructed. This created the directory c:\98ddk\ where it installed the nessisary files. I then set my path variable in autoexec.exe to include c:/98ddk/bin/win98 and c:/98ddk/bin (link.exe is in bin) I then edited my config.sys file to contain the line shell=c:\command.com /p /e:4096
again as instructed, then I rebooted my system. Launched DOS then moved to the directory where my hello.asm file was located and issued the command ml /Flhello.1st hello.asm
as instructed, The linker gave me a few warnings, in which the tutorial said to ignore, however it allso gave me the error Segment refernce in fixup record hello.obj: fatal error LNK1123: failure during conversion to COFF: file invalid or corupt. The result haulted creation of hello.exe however did produce hello.1st and hello.obj

Please help -=- aj67my@cyberspace.org



Sponsored Link
Ads by Google

Response Number 1
Name: shaft
Date: April 25, 2002 at 23:17:02 Pacific
Reply:

Hi Kelly,

You downloaded ddk, it's the driver development kit, so you can use this package to write drives under dos. If yoz want to learn assembly, and you are beginner, you shoould try to use tlink, tasm programms to compile assembly programs and make sure of your hardware knowledge is good.
Good luck.
Shaft


0

Response Number 2
Name: Jim
Date: April 26, 2002 at 13:22:00 Pacific
Reply:

Actually, either assembler (or many others) will work fine for doing windows apps. I suspect the problem is in the command line parameters. I don't do an awful lot of assembling apps with masm32, but the one batch file I found uses several command line switches. I'm not sure what they all are, but I'm thinking you might want to look at some of them.

Here are the ones my program uses:

ml -Fl -coff -DBLD_COFF -DIS_32 -W2 -c -Cx -DMASM6 -Sa Hello.asm


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Pro C link a menu with the form...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: ASM programing (80x86) Linker error

VC++ linker errors www.computing.net/answers/programming/vc-linker-errors/8940.html

Borland C++ Linker Error Messages - XP www.computing.net/answers/programming/borland-c-linker-error-messages-xp/1120.html

Linker Error: Undefined Symbol www.computing.net/answers/programming/linker-error-undefined-symbol/13465.html