The biggest difference between Linux and *BSD assembler is the way interrupts are called.
The following is related to FreeBSD, but it must not be *too different* for OpenBSD.
Years ago, there was a website called FreeBSD Hackers and they had two tutorials but it's down now. You can still get the first one
here.
Also check
http://int80h.org/.
Don't forget you may have to brand ELF files manually.