Ah, yes. I didn't fully read the question. I usually only care if the return code is 0 or not.

I don't think there is any way you will be able to return a status > 255. You can return the exit status in an environment variable and exit with a non-zero value. When you exit with the non-zero value you can then check the special environment variable.