Why does Assembly code that works on 32-bit Linux and 32-bit FreeBSD crash on 32-bit Haiku?

Sure, but if something works on Linux and FreeBSD on x86, you would kind-of-expect it to work on Haiku? Or, rather, as in the case of Windows and DOS, fail to assemble and link, rather than compile without warnings and then crash.