test-and-set for x86
Marcel Sondaar
Public Domain
sets a bit in a byte, and return the original
Return = original bit’s value (0 if clear, nonzero if set)