It's possible there are some specific conditions relative to the linux version of FPC, but just in case ...
Have you added a ':' character (i.e. colon character) at the end of your label ? Like '@ex:', to take your own sample.
For me, this is working without any problem for instance (but for the windows version of FPC):
{$asmmode intel}
function IsNull(value: integer): boolean;
begin
asm
mov eax, value
test eax, eax
jne @notnull
mov result, true
jmp @finished
@notnull:
mov result, false
@finished:
end;
end;