News:

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

Main Menu

Like to have a compiler & linker memory map from Visual Studio 2010

Started by BenPrice, January 19, 2014, 11:17:19 AM

Previous topic - Next topic

BenPrice

Hello there,

I was an assembler programmer for a few years around 1970, using machines like a PDP-8, PDP-11, IBM-1401, etc. It's been 40 years since I've done any assembler (or much programming) and I am now taking a course in University on IBM x86 assembler. I'm using Visual Studio 2010 (new to me) as my programming environment. I'd like to get a memory map out of the compile step, as well as a link map from the linker. I've briefly looked at some of the options in Visual Studio and I thought I had the memory map turned on, but apparently not. Can someone either point me to a YouTube video, or other instructional media that can help me configure Visual Studio to produce the maps? Thanks in advance. Ben Price - San Antonio

jj2007

> Visual Studio 2010 (new to me)

Hi Ben,

If you just started with VS, you still have a chance: Put that behemoth into a corner!

For Assembler, \Masm32\qeditor.exe is more than enough. Under the Project menu, you'll find a number of options how to translate your sources into executables. You can add your own batch file there, see \Masm32\menus.ini

Run \Masm32\bin\link.exe with /? to see the linker options, e.g. /MAP

More in this two-pager: Masm32: What you absolutely must know to get started

Welcome to the Forum :icon14:

BenPrice

Hello jj2007,

Thank you for your reply. I'll check out the link you've provided. As it happens, the class I'm taking requires the use of Visual Studio, along with a bunch of files from a book by Kip Irvine. Since I posted my original question, I've made a tiny bit of progress in understanding how to configure Visual Studio 2010. For me, there are two basic challenges, 1) How to enable the memory and linker maps (there seems to be multiple places to do that), and 2) where Visual Studio places the various source, object, link libraries, and load modules (it looks like substitution parameters are being used such as $(IntDir)%(FileName). It's the same story as always; any new environment takes up quite a bit of time to understand how it works, and perhaps especially with a "heavy" environment like Visual Studio, to determine which features are relevant to what you're trying to accomplish. The old learning curve strikes again. It's unfortunate that students have limited time to get up to speed on these technologies. Thanks again for your response. Ben

jj2007

Ben,

You are aware of Kip's own tutorial for VS setup?

I have just wasted an hour trying to convince VS 2010 Express that assembler projects exist, and that "external build tools" like myprojects.bat should have a commandline parameter like %1 or so. I give up, VS is the worst crap that I've ever seen (and I have quite a number of C++ projects that do actually work in VS...). Sorry for the rant...

Gunther

Ben,

Jochen is right: you should check for an alternative for VS. And welcome to the forum.

Gunther
You have to know the facts before you can distort them.

TWell

Quote from: BenPrice on January 19, 2014, 11:17:19 AM
I am now taking a course in University on IBM x86 assembler.
Is such a thing available for win32 :icon_confused: (maybe for OS/2 alp.exe)

1) do you mean .map file ?

BenPrice

(A quote from jj2007) You are aware of Kip's own tutorial for VS setup?

Yes, that tutorial is identified in my course's supporting documents, and it does contain information on "Generating a Source Listing File" which is very similar to what I'd like to have (compiler and linker memory maps). Overall, a very good reference document. Thanks for pointing that out.

Because I'm doing this as a student, the instructor sets the rules, so I WILL be using Visual Studio as the development environment. If I were an employee of X Corporation, I would use whatever they use. If I had the luxury of doing this on my own, I would research some of the various development environments (thanks to everyone for their suggestions) and pick one that is simple and easy to work with. My personal experience with assembler was text-editor/command-line based, so all these GUI environments are a step up for me (and I'm looking forward to getting up to speed).

Based on the everyone's help, especially jj2007, I believe I'll be able to find/enable the compiler and linker memory map functions in VS 2010. Consider the case closed! Ben - San Antonio.


dedndave

it would appear that "/Fm" is a MASM switch - that may also be valid for a command-line compiler, i suppose
for the linker, "/MAP:Filename.map" is the switch you want