Using ref and out parameters from inline assembly code
novice2
sorry at noem.ail
Wed Feb 13 02:44:15 PST 2008
> Can it just be referenced by its name like any other variable? Or would
i tried and failed. it needs double derefferencing, because inout param name give address of variable
This works for me:
[code]
//this func assing value 6 to param x
void func1(inout int x)
{
asm
{
mov EAX, x; //put x address in EAX
mov [EAX], 6; //put 6 into x
}
}
[/code]
More information about the Digitalmars-d-learn
mailing list