What I want to know is: what are the rules governing what it does? Does it allocate new colours temporarily, or permanently? If you have an odd number of colours in the colour table, how does it resolve the fact that one colour cannot have a direct XOR? Does it merely fill in the gap with a GrBlack()? :)
From your question I assume you are workin in palette mode.
By example in 16 color you have 16 index to colors. If you perform 1 XOR 2 you obtain index color 3. Now, if you don't have assigned the index color 3 what color is it?. Te answer is "undefined".