XOR use in MIPS Assembly

2020-05-09 17:11发布

问题:

Okay, I'm pretty sure I've used up all variations of possible XOR use to exchange $s0 with $s1, however, I still can't get it to work! It's MIPS Assembly and I'm using MARS. Please could somebody provide me a solution?

You will be greatly appreciated!

回答1:

Did you try

xor $s0, $s0, $s1
xor $s1, $s0, $s1
xor $s0, $s0, $s1