Florian Klaempfl wrote:

Are you sure with the strings?

Yes. Any function that returns a string is supplied with one more argument than it was declared. After calling the function, register eax (which is used to contain the non-parameter result) is not used.
Here is a simple example:

function TDOMCharacterData.GetNodeValue: DOMString;
begin
  Result := FNodeValue;
end;

push  ebx
push  esi
mov   esi, edx        <- address of result
mov   ebx, eax        <- Self
mov   eax, esi
mov   edx, [ebx+14]   <- FNodeValue
call  @WStrAsg
pop   esi
pop   ebx
ret


Sergei
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to