Well a lot of us know. There's only the small matter that the syntax you are using in the Delphi code is Intel syntax. And your question suggest you are mixing this up with the "+offset(%ebp)" is not Intel syntax, but gnu syntax, which has a different instruction order(reverse). Furthermore there is the issue of how to refer: ESP or EBP? Makes a big difference...
While experimenting to solve this yourself, make sure you have {$ASMMODE INTEL} on.
Also, "offset" is only recently added. It does not work in older versions of FPC.
[edit]
Marco's post crossed, basically I gave the same pointer. (Apart from mixing up syntax).
Also note that the internal assembler in FPC is more strict than BASM:
function ReturnAddr: Pointer;
asm
MOV EAX,[EBP+4]
end;
Delphi assumes dword size but [] indicates a pointer. You have to specify the size: dword ptr. It will still be delphi compatble. If you rely on an older version, use lea instead of offset.