sne¶
sne A, #K¶
指令格式¶
sne A, #K
影响标志¶
C
Z
伪指令¶
1 2 3 4 | bit[8] X = ((~K) + 1)[7:0] {C, X} = A + X Z = (A == K) ? 0 : 1 if A != K then skip end |
指令描述¶
比较累加器A和立即数K,如果不相等则跳过下一条指令;
范例¶
1 2 3 4 5 | //C = 0, Z = 0 mov A, #0x01 //A = 0x01 se A, #0x01 //C = 1, Z = 1, 将跳过下一条指令 inc A //被跳过 inc A //A = 0x02 |
sne A, R¶
指令格式¶
sne A, R
影响标志¶
C
Z
伪指令¶
1 2 3 4 | bit[8] X = ((~R) + 1)[7:0] {C, X} = A + X Z = (A == R) ? 0 : 1 if A != R then skip end |
指令描述¶
比较累加器A和寄存器R,如果不相等则跳过下一条指令;
范例¶
1 2 3 4 5 6 7 | //C = 0, Z = 0 mov A, #0x01 //A = 0x01 mov 0x80, A //[0x80] = 0x01 clr A //A = 0x00 se A, R //C = 0, Z = 0, 不会跳过下一条指令 inc A //A = 0x01 inc A //A = 0x02 |