The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: rocketscience on October 09, 2010, 03:53:25 AM

Title: iczelion port to visual studio?
Post by: rocketscience on October 09, 2010, 03:53:25 AM
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
Title: Re: iczelion port to visual studio?
Post by: baltoro on October 09, 2010, 08:24:36 PM
You mean: Using Microsoft Visual Studio 6.0 (http://kipirvine.com/asm/4th/ide/vs6/index.htm), and, Creating a Combined C++/Assembly Language Project (http://kipirvine.com/asm/4th/ide/vsnet/cppProject/index.htm)?   
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 (http://support.microsoft.com/kb/90530)
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? (http://www.masm32.com/board/index.php?topic=11878.0)
How do i use a MASM-module in VC++ 6.0?  (http://www.masm32.com/board/index.php?topic=14446.msg115801;topicseen)
MS VisualStudio + HLA + MASM = how to make it work together ? (http://www.masm32.com/board/index.php?topic=13336.msg103969;topicseen)
MASM calling C compiled with Visual Studio Express 2005 (http://www.masm32.com/board/index.php?topic=7026.msg52192;topicseen)
Link Error, unresolved external symbol (http://www.masm32.com/board/index.php?topic=10824.msg79481;topicseen)
linking c function with masm caller (http://www.masm32.com/board/index.php?topic=13182.0)
Problem understanding DLL calls (http://www.masm32.com/board/index.php?topic=903.msg6406;topicseen)
linking vc++ (http://www.masm32.com/board/index.php?topic=4875.0)

...sorry,...that's overkill,...
Title: Re: iczelion port to visual studio?
Post by: GregL on October 09, 2010, 09:44:17 PM
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.
Title: Re: iczelion port to visual studio?
Post by: rocketscience on October 09, 2010, 10:20:47 PM
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

Title: Re: iczelion port to visual studio?
Post by: dedndave on October 10, 2010, 03:20:21 PM
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