目录
or A, #K
Z
1 2
A = A | K Z = A ? 0 : 1
累加器A和立即数K进行相或,结果存储到累加器A;
1 2 3 4
//0x55 | 0xAA //Z = 0 mov A, #0x55 //A = 0x55 or A, #0xAA //A = 0xFF, Z = 0
or A, R
A = A | R Z = A ? 0 : 1
累加器A和寄存器R进行相或,结果存储到累加器A;
1 2 3 4 5
//0x00 | 0x00 //Z = 0 clr 0x98 //[0x98] = 0x00 mov A, #0x00 //A = 0x00 or A, 0x98 //A = 0x00, Z = 1
or R, A
R = A | R Z = R ? 0 : 1
累加器A和寄存器R进行相或,结果存储到寄存器R;
1 2 3 4 5 6
//0x12 | 0x34 //Z = 1 mov A, #0x34 //A = 0x34 mov 0xA8, A //[0xA8] = 0x34 mov A, #0x12 //A = 0x12 or 0xA8, A //[0xA8] = 0x36, Z = 0