I am trying to learn inline assembly programming in Delphi, and to this end I have found this article highly helpful.
Now I wish to write an assembly function return
With the excellent aid of A.Bouchez, I managed to correct my own code, employing LStrSetLength:
LStrSetLength
function myfunc: AnsiString; asm push eax // eax = @result mov edx, 3 mov ecx, 1252 call System.@LStrSetLength pop eax mov ecx, [eax] mov [ecx], 'A' mov [ecx] + 1, 'B' mov [ecx] + 2, 'C' end;