Syntax

Inline assembly statements can appear anywhere a C statement can appear (an __asm statement must be inside a C function). Inline assembly statements take one of the following forms.

Listing: Inline Assembly - Version #1
__asm <Assembly Instruction> ; [/* Comment */]
__asm <Assembly Instruction> ; [// Comment]
Listing: Inline Assembly - Version #2
__asm ( <Assembly Instruction> ) ; [// Comment]
Listing: Inline Assembly - Version #3
__asm {
<Assembly Instruction> [; Comment] \n

...................

}

If you use the first form, multiple __asm statements are contained on one line and comments are delimited like regular C or C++ comments. If you use the third form, one to several assembly instructions are contained within the __asm block, but only one assembly instruction per line is possible and the semicolon starts an assembly comment.