and¶
and A, #K¶
指令格式¶
and A, #K
影响标志¶
Z
伪指令¶
1 2 | A = A & K Z = A ? 0 : 1 |
指令描述¶
累加器A和立即数K进行相与,结果存储到累加器A;
范例¶
1 2 3 4 | //0xDB & 0x20 //C = 0, AC = 0, Z = 0, OV = 0 mov A, #0x20 //A = 0x20 and A, #0xDB //A = 0x00, C = 0, AC = 0, Z = 1, OV = 0 |
and A, #K
Z
1 2 | A = A & K Z = A ? 0 : 1 |
累加器A和立即数K进行相与,结果存储到累加器A;
1 2 3 4 | //0xDB & 0x20 //C = 0, AC = 0, Z = 0, OV = 0 mov A, #0x20 //A = 0x20 and A, #0xDB //A = 0x00, C = 0, AC = 0, Z = 1, OV = 0 |