A link is a pointer with semantics meaning - in assembly language, these semantics do not matter, so you are left with a pointer:
void foo(int& x)
{
__asm {
mov eax, x
mov DWORD PTR [eax], 10
}
}
(Of course, YMMV depending on the compiler, version, optimizations, etc. are all normal things when using the built-in assembly.)
Zooba source
share