The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: masm_enthusiast on January 12, 2007, 08:28:14 PM

Title: lnk2001 error
Post by: masm_enthusiast on January 12, 2007, 08:28:14 PM
Hello. I am new to MASM and eager to know more. I am currently doing a course that extensively involves ALP in MASM32. I have installed MASM32.It did install sucessfully and all that. however, I am unable to link the program.Its assembled...but I get some long error msg on the cmd screen abt LNK2001.LNK1120 :1 unresolved external. can anyone please help me get my MASM32 running? I need to get out of this hitch ASAP.

My OS in winxp and I did try reinstalling. I cannot figure out what went wrong! Help! please!
Title: Re: lnk2001 error
Post by: hutch-- on January 12, 2007, 09:03:45 PM
Try posting at least some of your source so that we know what you are working on in terms of code type and platform.
Title: Re: lnk2001 error
Post by: masm_enthusiast on January 12, 2007, 10:08:09 PM
sure. Its just a humble code. I was trying to do an exercise given in the lab.

It is a program to subtract 2 16 bit no's

code    segment
Assume  cs:code, ds:code
org 1000h
mov si,[2000]
mov ax,[si]
mov bx, [si+02]
sub ax,bx
mov [si+04],ax
hlt
code ends
end

I saved it as sub.asm and then Project>Assemble n Link. it didnt show any error on assembling..but showed that link error.
Title: Re: lnk2001 error
Post by: hutch-- on January 12, 2007, 10:17:55 PM
Ok,

Its 16 bit DOS code that will not build with the 32 bit linker in MASM32. Get the OMF linker form the forum web site.

I will move this topic to the 16 bit forum shortly.