As far as I understand the specification, if the result of the function is integer, it is returned through the eax register, and if real, then through the coprocessor register st0 .
This decision seems strange to me for what reason. I tried to write on C the functions returning structures, and everything works. But the structure, most likely, will not fit into the registers of the processor, and it will have to be returned in some other way (for example, return via eax a pointer to the fragment of the stack in which it was located). Why was it not done, as in the Pascal agreement: after the actual parameters of the function, push the stack as many bytes as is required for the return result so that the function writes it there?
call, and the callee , using this address, copies the result ( severalmov) there (on the caller's stack) from its local memory (just beforeret). - avp