User`s manual

184 digi.com Using Assembly Language
The following code shows how to clear field f1 of a structure (as a returned value) of type struct s.
It is crucial that @SP be added to @RETVAL because @RETVAL is an offset from the frame reference
point, not from the current SP.
typedef struct ss {
int f0; // first field
char f1; // second field
} xyz;
xyz my_struct;
...
my_struct = func();
...
xyz func(){
#asm
...
xor a ; clear register A.
ld hl,@SP+@RETVAL+ss+f1 ; hl <- the offset from SP to f1 field of returned struct
add hl,sp ; hl now points to f1.
ld (hl),a ; load a (now 0) to f1.
...
#endasm
}