目录
dec R
Z
1 2
R = R - 1 Z = R ? 0 : 1
将寄存器R减1,结果存回到寄存器R;
1 2 3 4 5
//Z = 0 mov A, #1 //A = 1 mov 0xA5, A //[0xA5] = 1 dec 0xA5 //[0xA5] = 0, Z = 1 dec 0xA5 //[0xA5] = 0xff, Z = 0
dec A, R
A = R - 1 Z = A ? 0 : 1
将寄存器R减1,结果存储到累加器A;
1 2 3
//Z = 1 set 0x89 //[0x89] = 0xff dec A, 0x89 //A = 0xfe, Z = 0