WinAPI, MASM and Visual Studio

For everything that's not in any way related to PureBasic. General chat etc...
Hysteria
User
User
Posts: 50
Joined: Sat Oct 23, 2010 8:51 am
Location: UK

WinAPI, MASM and Visual Studio

Post by Hysteria »

Hi Guys

While our fantastic PB supports inline assembly and easy WinAPI support, I've been wanting to play around with MASM (or ML) using VS2015 just for fun. Like many of you I enjoyed many hours of 8 and 16bit assembly coding back in the day (tempted to say 'good old days' :) )

Anyway, while the assembly language bit makes sense and VS offers lots of great debugging features to see what's going on, I really want to get some windows I/O going. What could be easier than a MessageBox I thought? Microsoft must have made the necessary libraries and headers available as they are to every other MS supported language...Well, it seems not :lol:

What made it worse was the many examples that I found on-line that purported to show me how to do this only to find they all relied on third-party libraries/definitions. The unfortunately (in my case) named MASM32 confused me a lot as I assumed it was the 32 bit version of the MASM but eventually figured out it was a third-party add-on...

So, for anyone not asleep already, I wondered if any of our resident assembly geniuses here could provide me a simple example that could be used verbatim in a current version of VS, with only Microsoft's 'MASM' installed which shows a basic dialogue box such as a message requester. I'm not a C expert so I feel, reverse-engineering its header files would take me forever. However if someone could show me how you can go from the C-based WinAPI syntax to something that will compile and link (to an exe) in MASM, it would be extremely useful.

Any help would be much appreciated!

Thank you so much!

Hysteria
normeus
Enthusiast
Enthusiast
Posts: 472
Joined: Fri Apr 20, 2012 8:09 pm
Contact:

Re: WinAPI, MASM and Visual Studio

Post by normeus »

Steve Gibson from GRC and the famous Spinrite has a tutorial or two using MASM on this page

https://www.grc.com/smgassembly.htm
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
Hysteria
User
User
Posts: 50
Joined: Sat Oct 23, 2010 8:51 am
Location: UK

Re: WinAPI, MASM and Visual Studio

Post by Hysteria »

normeus wrote:Steve Gibson from GRC and the famous Spinrite has a tutorial or two using MASM on this page

https://www.grc.com/smgassembly.htm
Thanks Normeus, I'll check that out.
Post Reply