News:

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

Main Menu

Using Visual Studio and Masm32 SDK or Masm64 SDK

Started by zedd151, September 26, 2024, 10:25:01 PM

Previous topic - Next topic

sinsi

I gave it a go in a new Windows 10 VM. Installed VS (C++ build) and the Windows 11 Kit, installed MASM64.
Created a template with settings for (hopefully) MASM64.

The way it's configured you need the ASM project on the same drive as MASM64.
If not, you need to change the configuration from "\masm64\..." to "x:\masm64\...".

I put the template in "Documents\Visual Studio 2022\Templates\ProjectTemplates\MASM".
It's a 64-bit windows project.


NoCforMe

Quote from: sinsi on September 29, 2024, 04:11:04 PMNoCforMe, there needs to be a coherent post to make it sticky. You are the documentation man, if we throw some stuff at you do you volunteer to break it down into bite-sized pieces?

Sure, just give me the (accurate) raw material and I'll massage it into something useful for n00bs (and non-n00bs).
Assembly language programming should be fun. That's why I do it.

zedd151

#18
Thanks guys for the replies.  :thumbsup:
It seems there are more members here than I had even thought, that use Visual Studio.
So I think if someone needs assistance in setting up VS + masm  (one of the SDKs that is) and posts questions in the Campus about any issues,  there is a high probability of their query being answered by someone with experience and knowledge with that scenario.  Thanks again.

Perhaps I was making much ado about nothing. And perhaps a separate board for Visual Studio+Masm SDK's is unwarranted. As suggested a "sticky topic" with helpful instructions might be all that is needed.
 Any thoughts? Any willing volunteers for that little task?
"We are living in interesting times"   :tongue:

kingdelee

As a new MASM by VS learner, it's really diffcult and waste me much time to know How to configur VS and  build a MASM project, and make integration two or more project

I hope someone could make a video or pic about it, or teach me , then I can make a video share it.

Greenhorn

#20
There are tons of videos how to do it ...
https://www.youtube.com/results?search_query=masm+visual+studio
Kole Feut un Nordenwind gift en krusen Büdel un en lütten Pint.


C3

Quote from: kingdelee on October 16, 2024, 06:16:06 PMAs a new MASM by VS learner, it's really diffcult and waste me much time to know How to configur VS and  build a MASM project, and make integration two or more project

I hope someone could make a video or pic about it, or teach me , then I can make a video share it.


Just to comment this post. Setup of Visual Studio for Assembly Project is very easy, takes two minutes to add required settings. And you can make a template for Project to create from it again. I assume you read other posts in this Forum and I guess you already found a YouTube video with this topic? If you didn't I can make show to step by step guide here.

NoCforMe

I've volunteered to put together a sticky post explaining how to use VS with our SDKs.
Since I have no experience myself with doing this, I need accurate information to do this. I would be functioning as your humble scribe.
I've put out a call for information, PM'd a member who seemed willing to provide it, but have heard nothing back.

If you have experience using VS to create MASM programs, could you please send me any information on doing this that would be helpful to beginners here? My intention is to put together a "recipe" in a single sticky post that would get people started with the basics here, including all needed configuration settings.

Instead of posting here and cluttering up this thread, please put this info in a PM to me. When I get enough info to put together a decent post, I'll post it here so people can examine it and correct any errors before we publish it.

Thanks!
Assembly language programming should be fun. That's why I do it.

ognil

"Not keeping emotions under control is another type of mental distortion."

NoCforMe

Thanks. But no thanks, no videos please: I use text.
And that video has nothing to do with our SDK so far as I can tell. That's the whole point of this exercise.
Assembly language programming should be fun. That's why I do it.

iZ!

Quote from: iZ! on September 29, 2024, 10:35:22 PMI haven't tried in versions after vs2015, but it used to be like this - you check the C++ package during installation, then add a C++ project to the solution (don't worry C haters like me, you won't see a single line of C code  :smiley: ), right click it and under Build dependencies > Build customizations, tick MASM.
Add new C++ file and rename it to "something.asm".
If in x64 mode, then you're good to go - write your first PROC and call it from your fav managed language using DllImport or such. It's good to set the output directory to be the same for both, the managed and assembly.
The nice thing is you can assign memory to variables in managed lang., not having to worry about the stack. And debug altogether.
Oh.. and under properties, enable No Entry point
I knew I forgot something:
Under 'Source Files', where you've put your asm file, you also need to add the Module-Definition file (.def) found under Code group. It should contain something like this:
LIBRARY "MyLib"
EXPORTS MyFunction1
EXPORTS MyFunction2
...

C3

Quote from: iZ! on October 19, 2024, 02:04:06 AM
Quote from: iZ! on September 29, 2024, 10:35:22 PMI haven't tried in versions after vs2015, but it used to be like this - you check the C++ package during installation, then add a C++ project to the solution (don't worry C haters like me, you won't see a single line of C code  :smiley: ), right click it and under Build dependencies > Build customizations, tick MASM.
Add new C++ file and rename it to "something.asm".
If in x64 mode, then you're good to go - write your first PROC and call it from your fav managed language using DllImport or such. It's good to set the output directory to be the same for both, the managed and assembly.
The nice thing is you can assign memory to variables in managed lang., not having to worry about the stack. And debug altogether.
Oh.. and under properties, enable No Entry point
I knew I forgot something:
Under 'Source Files', where you've put your asm file, you also need to add the Module-Definition file (.def) found under Code group. It should contain something like this:
LIBRARY "MyLib"
EXPORTS MyFunction1
EXPORTS MyFunction2
...

Yes, its required but only for DLL Project and needs to be added LINKer's Module Definition File setting, to successfully do assembly and linking.