Jump to content

Xor swap algorithm/Assembler Code

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Rlee0001 (talk | contribs) at 20:50, 9 November 2002 (Created Article, needs explaination.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

The following routine swaps the value in the AX register with the value in the BX register without using a temporary buffer.


           XOR         AX, BX
           XOR         BX, AX
           XOR         AX, BX


See: Xor swap algorithm