如何在C/C++使用内联汇编[英文版]
2010-01-10 09:37:23 来源:WEB开发网Accessing C or C++ data in an asm statementIn general, instructions in an asm statement can reference any symbol in scope where the statement appears. The following statement loads the AX register with the value of var, a C variable in scope:asm mov AX,var
An asm statement can reference a uniquely named member of a class, structure, or union without specifying the variable name or type before the period operator. But if the member name is not unique, you must specify a variable or type name before the period operator. If two structure types have a member name in common, as in this example:
struct first_type
{
char *mold;
int common_name;
};
struct second__type
{
char *mildew;
long common_name;
int unique_name;
};
更多精彩
赞助商链接