News for hackers. Stuff that matters.
Re:What algorithm blows your mind? (Reddit compsci) by cosmicray on Friday October 29, 2010 @10:00AM (#1847324)
while looking thru some 360 assembler code one day, I came across this ...

XC loc1,loc2

XC loc2,loc1

XC loc1,loc2

It took a day of head scratching, and various notes, before I understood that it was a clever way of exchanging the contents of two storage locations, without a third intermediate location. Three consecutive exclusive-Ors.

There are no comments on this comment yet.