views:

63

answers:

1

We can use stuff like this in visual studio:

__asm
{
    mov   x1,offset thunk_begin; 
    mov   x2,offset thunk_end;
}

But as quoted from here:

Since Visual Studio does not recognize assembly code, Visual Studio will have to be told what program to call to compile the assembly code.

I'm really confused.

+6  A: 

That refers to standalone assembly source files, not inline asm, which is what your example is.

Exactly. Poster overlooked that the page talks of .asm files - which are NOT inline Assembler.
TomTom
I don't think there are huge difference between .asm and inline Assembler,do you?
wamp
@wamp: The big difference is that, in Visual C++ inline assembler, you can refer directly to symbols from the surrounding C / C++ code. To do so, you need access to the C / C++ compiler's symbol table -- and that pretty much implies that the compiler needs to assemble the inline assembly.
Martin B