Click to See Complete Forum and Search --> : Assembler
ohadbp
July 31st, 2002, 03:51 AM
hello,
can i use the Ms visual Studio to write programs in assembler??
if so how do i do that?
(i am not intrested in writing assembler code inside a c++ program
but writing a full assmbler program and compile it using the Microsoft visual studio)
thanks,
ohad.
stober
July 31st, 2002, 04:39 AM
no. you need masm, or tasm, or some other assembler to do that.
dude_1967
July 31st, 2002, 04:59 PM
ohadbp:
Are you interested in mixing pure asm-files with C/C++ files?
This can be done easily with VC6 as well as VC.NET. I can provide you with a sample project if you want.
Chris.
dude_1967
August 1st, 2002, 08:18 AM
Hello,
Various developers wanted the above-mentioned sample project which integrates pure assembly files into the Dev.-Studio environment.
Here is one of them ("cpuid"). The program does some rudimentary identifications of the Pentium CPUID (See http://www.intel.com/design/xeon/applnots/241618.htm).
The netwide assembler nasm is used (homepage seems to have moved, can't find it right now). You must download the windows version of nasm called nasmw.exe from somewhere: It makes the zip-archive too big for this forum.
There are Projects for VC1.52 (pure DOS, 16-bit), VC.6 (32-bit Win32), VC.NET (32-bit Win32).
This software is primarily for educational purposes, no guarantees here. The project is very old and should not be taken as a treatise on the sensible use of C++.
Send private message if you have further questions.
Good luck.
Chris.
:)
Kdr Kane
August 1st, 2002, 10:26 AM
http://sourceforge.net/projects/nasm
stober
August 1st, 2002, 08:24 PM
I downloaded cpuid.zip and nasm, loaded the project with VC6, and tried to build. It gave me an error that it could not find \nasm\... -- that's not the problem because I havn't installed it yet. My question: I can't find in Project | Settings or Tools where VC6 knows about nasm. Is there some setting someplace that tells it to use nasm when the file extension is asm?
dude_1967
August 2nd, 2002, 02:46 AM
Sorry,
I forgot to mention anything about that. This project uses a so-called "custom build" which can be set in the Dev. Studio environment. The custom build for a given asm file fully specifies the complete command line for assembling a given asm file. The Dev. Studio environment recognizes the created obj file and links it automatically (the output should have the extension .obj).
Everything in the project posted yesterday is already setup to run properly. Make sure that "nasmw.exe" is in the project "nasm" directory (i.e. ...\cpuid\nasm\nasmw.exe). The project actually carries a local copy of nasmw.exe around with it. I bet there is a better way to manage this type of thing but it works nonetheless.
To setup things from scratch for your projects, do the following.
Use VC.6, English:
Choose Project---Settings, then the dialog box with various file-settings for all the files comes up. For C/C++ files there are two tabs: One for General, one for C++. For the assembler files there are also two tabs but a bit different: One tab for General and one tab for custom build. I simply use the custom build to fully specify the build command for such asm files.
By the way, I took the time to get the dust off the project yesterday night. The Dev.Studio 1.52 pure DOS version in the posted zip actually was out of proper working order, the others worked. A corrected version is available.
Please let me know if you can find any improvements for managing this type of mixed-language project. Thanks.
Chris.
:)
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.