You’re calling
push
right in the middle of your high level code – this is almost bound to cause problems because the
asm code generated by the compiler from your source code most likely uses the stack, too. You were just lucky that it didn’t break before.
Never had a problem from Delphi 3 on and upwards to Delphi XE, I haven't tested in XE2 but I am sure this code works there too.
I am trying to find a way to do the same in Lazarus. I also tried to make a simple call without any params
(so a simple
asm call proc; end;
)
and does not work either. I think this is a FPC bug.