News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

New member here ... with a question

Started by CCurl, October 03, 2015, 03:54:02 AM

Previous topic - Next topic

CCurl

Hi ...

My name is Chris Curl. I guess I would call myself an old newbie. I started programming 30 years ago on the Commodore 64. Over the years, I have programmed in many different languages, including x86 assembler. The thing is, though, that it has been almost 20 years since my assembler days, and things have changed (for the better I'm sure) since then. On top of that ... my memory is not what it used to be! :)

The question I have is this ... I recently decided to dust off my x86 assembler and write a Forth system with the core words written in assembler. I have Visual Studio 2013 (Ultimate), and have been able to create a MASM project. I wrote a simple "hello world" program using examples I found on the internet, so I am not sure it what I have has all the correct directives. The code builds, but I keep getting "lnk2001 unresolved external symbol" errors from the linker. My gut tells me there is something simple I am missing, but I haven't stumbled on it yet.

Any thoughts about what to check or look for would be great. Once I get off the ground on this, I think I'll be OK.

Can anyone point me to a thread or working example of how to build and link an assembler project using visual studio 2013?

Fraile

you, have tested EASY CODE.
http://easycode.cat/Spanish/index.htm

I  use for masm32.

Zen

Hi, CCURL,
If you are getting a Linker error, this is typically because the Linker can't find a Library, or an exported function.
Quote from: CCURL...My gut tells me there is something simple I am missing,...
This is correct.   
Show us the code. And, as a suggestion,...build it initially with the MASM compiler included with The MASM32 SDK Version 11.   
...But,...most of us here are familiar with Visual Studio,...it's probably a project setting that you are not doing correctly,...

dedndave

a similar message may be generated if you don't have the entry point referenced in the END statement

    END     Start

truthfully, if you want to build ASM projects, use the link in the upper-right corner to get the masm32 package
we use VS when we need C or C/ASM mix

welcome to the forum
many memebers here come from the same background
old
can't remember shit
started programming a long time ago

Zen

Quote from: DAVE...can't remember shit,...

This is SO True. Half the time when I'm writing assembly code,...I get partially into upgrading a particular code block to make it bulletproof,...lose my continuity,...and abandon the code in a haphazard state,...only to have to return several days later to the same problem,...thinking,...my GOD !!! ...extraterrestrials have hacked into my source,...AGAIN !!!,...those f*ckers !!! WHY ??? :icon_eek:

rrr314159

Hi CCurl,

Unlike the rest of you, I can remember sh*t, it's the good stuff I forget ... :biggrin:

That linker error is very common and if you were using masm32 and showed your code (which would be about 10 lines) we'd easily identify it. Unfortunately I can't help u with VS. masm32 is a very light package, easily installed and uninstalled (just delete the directory, and change the .asm association from qEditor back to VS) so consider downloading it and using it to get up and running on assembler. You can easily transfer the knowledge to VS; in fact use both simultaneously
I am NaN ;)

CCurl

I'm at work right now. I'll post it up later this evening. I'll also look into using masm32. Assuming it is free, I'm not against using that instead of VS 2013. I hope it has an integrated debugger.

rrr314159

It's free and a good product, but no integrated debugger. In fact that's the main reason to use VS, from my POV. With masm32 package most people use olly-debug, there are plenty other choices, we can provide links to them all, often it's difficult to get source-view working, usually I don't bother with it. One reason, none of them handle macros correctly anyway (including VS)

BTW masm32 is a package, not a compiler / assembler. You can use any assembler with it - for instance whatever you already have in your VS directory; or ML 6.15, JWasm (my fave) etc. The package includes all the necessary standard lib's and inc's, useful macros, lots of examples and tutorials; and is well known by many of us on this board

I'm comfortable recommending masm32, even tho it might not be exactly what you want, because it's free, light download, easily uninstalled, no virus or any BS. People who prefer VS - which has many, many features masm32 doesn't - will probably want to use it. But as a beginner, and to get max use out of this board (a huge plus when learning assembler) I think it's worth your while to try it

Or ignore it, and post your VS code, no doubt someone will (immediately) identify your linker problem
I am NaN ;)

CCurl

Let me play around with this MASM32 thing a little before I bother you with what might resolve itself using a MASM32.

Thanks

CCurl

so it complained about some missing DLL entry points, but it still finished and reported that everything was OK.

here are the first few messages ... should I worry? if it means anything, my system is an AMD 8350 running windows 10.

GoneFishing

Just ignore those messages and press Ok button

CCurl

That is what I did ... I am now writing programs in assembler!

jj2007

Great :t

Now take a look at Masm32: What you absolutely must know to get started

You can safely ignore the green text, but the links to JWasm and OllyDebug are important, plus some other useful hints.

zedd151