Thread: ASM in VC++ 6.0

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    44

    ASM in VC++ 6.0

    Hi,

    I been programming in C/C++ for a while, and decided to get down and dirty with assembly. My question is: how do i go about setting up Visual C++ 6.0 to compile assembly? Do I need any specific header files, or library files? Any help in getting an empty project up and goin and ready to compile would be really helpfull.

    And while I'm at it, does anyone have any good beginner ASM tutorial sites? I find a lot of them which leave a lot of things un-explained. Which doesn't teach me anything, even if I can memorize the syntax. Thanks.

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571

    Re: ASM in VC++ 6.0

    Originally posted by Strut
    Hi,

    I been programming in C/C++ for a while, and decided to get down and dirty with assembly. My question is: how do i go about setting up Visual C++ 6.0 to compile assembly? Do I need any specific header files, or library files? Any help in getting an empty project up and goin and ready to compile would be really helpfull.

    And while I'm at it, does anyone have any good beginner ASM tutorial sites? I find a lot of them which leave a lot of things un-explained. Which doesn't teach me anything, even if I can memorize the syntax. Thanks.
    Are you trying to say you want Visual C++ to be able to compile assembly code? That isn't going to happen. You will need a pure assembly compiler to compile your assembly code. Try looking for either NASM or MASM. If you want to use some inline assembly in your exisiting C/C++ project then you can do it as follows:

    Code:
    __asm
    {
        /* Code goes here */
    }

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    >>Are you trying to say you want Visual C++ to be able to compile assembly code? That isn't going to happen.

    Well...it does turn your code into ASM and then effectively assembles it....so really your compiler is just high level assembler with lots of extras. When you inline, all you are doing is telling the compiler to sit back....the asm code you type in VC++ is normal MASM-like assembler...

    If you want an assembler, then you can get both NASM and MASM for free on the web...

    I choose MASM as its Win32 support is very good and there's loads of web resources available....do a search on iczelion on google......that guy's site has superb resources and tuts and will be able to direct you to the most recent MASM package for download (although M$ has given up support for this tool, a guy called Steve Huchesson updates the libs and includes quite regularly and his written a load of MASM tools that are part of the package)....

    Give it a go...its free so you wont lose anything

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    44
    Thanks, I've already downloaded MASM on my computer at home. I'll embark on the perlisous journey to learn assembly starting tonight.

    I appreciate the help you have provided to me.

  5. #5
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    Originally posted by Fordy
    >>Are you trying to say you want Visual C++ to be able to compile assembly code? That isn't going to happen.

    Well...it does turn your code into ASM and then effectively assembles it....so really your compiler is just high level assembler with lots of extras. When you inline, all you are doing is telling the compiler to sit back....the asm code you type in VC++ is normal MASM-like assembler...

    If you want an assembler, then you can get both NASM and MASM for free on the web...

    I choose MASM as its Win32 support is very good and there's loads of web resources available....do a search on iczelion on google......that guy's site has superb resources and tuts and will be able to direct you to the most recent MASM package for download (although M$ has given up support for this tool, a guy called Steve Huchesson updates the libs and includes quite regularly and his written a load of MASM tools that are part of the package)....

    Give it a go...its free so you wont lose anything
    I understand that Visual Studio creates assembly from your C/C++ source. However, I meant that you cannot type out a normal asm file ( i.e. 68K file ) and hit compile and have something meaningful happen. Guess I should have been more clear.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. makefile exported by vc 6.0 doesn't work
    By wow in forum Windows Programming
    Replies: 7
    Last Post: 03-24-2006, 04:20 PM
  2. Can't compile this with VC 6.0
    By uriel2013 in forum C++ Programming
    Replies: 4
    Last Post: 05-31-2003, 07:43 PM
  3. adding a header file in VC 6.0
    By stimpyzu in forum C++ Programming
    Replies: 5
    Last Post: 10-28-2002, 02:26 AM
  4. My graphics library
    By stupid_mutt in forum C Programming
    Replies: 3
    Last Post: 11-26-2001, 06:05 PM
  5. VC 6.0 compiled error
    By alan4100 in forum Windows Programming
    Replies: 4
    Last Post: 09-17-2001, 03:10 PM