Fixed macro so that the EX register is not overwritten.