目录
xor A, #K
Z
1 2
A = A ^ K Z = A ? 0 : 1
累加器A和立即数K进行异或,结果存储到累加器A;
1 2 3 4
//0xAA ^ 0x55 //Z = 1 mov A, #0xAA //A = 0xAA xor A, #0x55 //A = 0xFF
xor A, R
A = A ^ R Z = A ? 0 : 1
累加器A和寄存器R进行异或,结果存储到累加器A;
1 2 3 4 5
//0x56 ^ 0x56 //Z = 0 mov A, #0x56 //A = 0x56 mov 0xB6, A //[0xB6] = 0x56 xor A, 0xB6 //[0xB6] = 0x00, Z = 1
xor R, A
R = A ^ R Z = R ? 0 : 1
累加器A和寄存器R进行异或,结果存储到寄存器R;
1 2 3 4 5 6
//0x12 ^ 0x34 //Z = 0 mov A, #0x34 //A = 0x34 mov 0xF1, A //[0xF1] = 0x34 mov A, #0x12 //A = 0x12 xor 0xF1, A //[0xF1] = 0x26, Z = 0