I didn’t know this but there is a way to exchange the contents of two registers without using a temporary register:

x = x XOR y
y = x XOR y
x = x XOR y
Advertisements