Make eBroadcast my Homepage | Contact Us   Return To The Main eBroadcast Homepage
Australia
Web Guide Search
Australia
Welcome It's
Australia
Australia
Web Guide: Encyclopedia
EBroadcast Australia
Powered by Wikipedia

<<Up     Contents

Xor swap algorithm/Assembler Code

The following code in x86 assembly language uses the xor swap algorithm to swap 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

However, all x86 microprocessors have an XCHG instruction which does the same work on its operands more efficiently than the above sequence of XORs.

Elsewhere
EBroadcast Australia
Search engine
Web directory

CONTENTS:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z

Australia
eBroadcast Australia
Australia © 06 eBroadcast Australia | About eBroadcast | Legal Notices | Privacy Policy | Contact Us    Return To The Main eBroadcast Homepage