How can I return a 12 byte from a function?

Use a global data area. Declare a global array of 12 bytes. Not what you asked, but it would do the job.

If you really want to return 12 bytes, you could pass 3 long ints by reference.