Using C Symbols

An __asm block can refer to any C symbol that is visible (in scope) where the block appears. (C symbols are variable names, function names, and labels—in other words, names that aren't symbolic constants or enum members.)

A few restrictions apply to the use of C symbols:

Each assembly-language statement can contain only one C symbol. Multiple symbols can appear in the same assembly instruction only with OFFSET, LENGTH, TYPE, and SIZE expressions.

Functions referenced in an __asm block must be declared (prototyped) earlier in the program. Otherwise, the compiler cannot distinguish between function names and labels in the __asm block.

An __asm block cannot use any C symbols with the same spelling as MASM reserved words (regardless of case). MASM reserved words include instruction names such as PUSH and register names such as SI.

Structure and union tags are not recognized in __asm blocks.