News:

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

Integrating asm

Started by shadowx360, August 19, 2009, 10:22:21 PM

Previous topic - Next topic

shadowx360

Hello, I am new to masm, I have losts of experience with C/C++/C#, VBS, Java, and a little bit of Haskell.

My need to learn asm stems from the need for very fast code. However, upon starting, I realize how much I miss all the conveniences of higher level languages, and I was told that I can integrate asm into C++ using the __asm keyword. However, I don't know which form of asm is supported by Visual Studio 2008.

Does anyone know which form of asm I should learn in order to be able to use it in VC++? I know that HLA's syntax isn't support.

2-Bit Chip

C++ would use inline assembler. Learn 32-bit assembly and you will be fine.

raymond

All the C family of languages seem to be supported by MS. The supported assembly syntax would thus most probably be the same as MASM which is also from MS.
When you assume something, you risk being wrong half the time
http://www.ray.masmcode.com

hutch--

Shadow,

MASM uses the same object module format as VC and it is actually part of VC so it is the most obvious choice.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

shadowx360

Thanks for the replies, I appreciate your help. Guess I'll have to start reading tutorials again. Is the "Art of Assembly" teach 32-bit assembly valid for my purpose?

2-Bit Chip

The 32-bit electronic edition for Windows.

Rockoon

It should probably be noted that Microsofts compilers do not (currently) support inline assembler when targeting 64-bit platforms. Its a real shame.
When C++ compilers can be coerced to emit rcl and rcr, I *might* consider using one.

Slugsnack

Yes.. for that reason I have been slowly moving away from ASM lately. However you can still use intrinsic functions as a partial substitute : |

Rockoon

Quote from: Slugsnack on August 20, 2009, 11:09:33 PM
Yes.. for that reason I have been slowly moving away from ASM lately. However you can still use intrinsic functions as a partial substitute : |

..or just use a stand-alone assembler and link in the resulting libraries

It isnt like being inline had much in the way of advantages.. inline assembler castrates the optimizer.. intrinsics ARE better for inline stuff.
When C++ compilers can be coerced to emit rcl and rcr, I *might* consider using one.