Hi, your code seems fine. There is no OpenBSD specific conventions you need to take into account, so you don't need to find specific OpenBSD assemply tutorials (at least not for this issue). Since when you remove function prologue/epilogue, your program is ok, then I guess you mess with the ebp register inside your function's body. In any case, can you send some more of your code, so that one can check it out? This code you send is perfectly valid, though.
regards, Stef

