News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

iczelion port to visual studio?

Started by rocketscience, October 09, 2010, 03:53:25 AM

Previous topic - Next topic

rocketscience

I have just started assembler programming.  I am using Visual Studio (2005), as I am already comfortable with its user interface.  I use it also for C programming.  Kip Irvine's tutorials are written for the Visual Studio environment, and they have been a good start for me.  Iczelion's tutorials seem to be a good next step, but they seem to have been written with MASM32 in mind.  Is anyone aware of a Visual Studio port for these tutorials?

Thanks

baltoro

#1
You mean: Using Microsoft Visual Studio 6.0, and, Creating a Combined C++/Assembly Language Project?   
It's a good idea to understand how to use both Visual Studio and MASM's QEditor and compiler. Often you will want to compile assembly routines to a DLL (or an Object File), and then just call the routines from your C or C++ Visual Studio Project. It's pretty simple, really. The easiest way is just to include the compiled object file in your Visual Studio Project directory. The only real difficulty is checking to make sure your calling conventions are compatible. If you compile to a DLL. you must prototype the exported function's signature in your C or C++ source file before calling the routine (the assembly function must be public and exported, using a DEF file).
This support article from Microsoft, demonstrates How To Export Data from a DLL or an Application
There are lots of previous threads about this subject here at the MASM forum if you use the search facility. Examples:
Calling a MASM proc from C++ - how to get to the cstd lib?
How do i use a MASM-module in VC++ 6.0?
MS VisualStudio + HLA + MASM = how to make it work together ?
MASM calling C compiled with Visual Studio Express 2005
Link Error, unresolved external symbol
linking c function with masm caller
Problem understanding DLL calls
linking vc++

...sorry,...that's overkill,...
Baltoro

GregL

rocketscience,

It's not that difficult to do. You shouldn't have to change the .asm files at all. Download and install MASM32 so the includes and libraries are available to you. Get the paths to the includes and libraries right and you also need to set up your VS project for a MASM project. It's easier to do in the later versions of Visual Studio. baltoro posted a lot of good information there.

rocketscience

baltoro and GregL,

Thanks for your help.  I am using Visual Studio 2005.  baltoro, thanks for the advice.  I will keep that in mind as develop further.  GregL, I downloaded and installed MASM32, and the iczelion tutorials build properly using Visual Studio.  It's the *.inc files in the MASM32 installation that are needed.  I was originally wondering whether there is another version of the tutorials that do not rely on the MASM32 include files.  But the solution of installing the MASM package is relatively painless, and I'm still using the VS user interface.

Thanks again to both of you.

Regards,

rocketscience


dedndave

be aware that a few of Iczelion's tutorials may have little mistakes in them   :bg
i sometimes wonder if they aren't there intentionally, to force you to learn how to debug programs