_retval is marked in your asm as an output, therefore you have to set it in the assembly code. gcc knows the assignment to _retval is unused. If youwant to modify _retval, use "+rm", not "=rm".
Thanks! It works now, I knew I must have done something wrong. - Mihai