isnz¶
isnz R¶
指令格式¶
isnz R
影响标志¶
无
伪指令¶
1 2 | R = R + 1 if R != 0 then skip end |
指令描述¶
将寄存器R加1,结果存回到寄存器R,同时判断结果,结果不为0则跳过下一条指令;
范例¶
1 2 3 4 5 6 7 8 9 | //打印0x00~0xff cseg print_0x00_0xff: clr R0 //R0 = 0 mov A, R0 //A = R0 call print_hex_A //以16进制打印数字 isnz R0 //R0 = R0 + 1; if R0 != 0 then skip next instruction end ret jmp print_0x00_0xff + 1 |
isnz A, R¶
指令格式¶
isnz A, R
影响标志¶
无
伪指令¶
1 2 | A = R + 1 if A != 0 then skip end |
指令描述¶
将寄存器R加1,结果存储到累加器A,同时判断结果,如果不为0则跳过下一条指令;
范例¶
1 2 3 4 5 6 7 8 9 | //打印0x00~0xff cseg print_0x00_0xff: clr A //A = 0 mov R0, A //R0 = A call print_hex_A //以16进制打印数字 isnz A, R0 //A = R0 + 1; if A != 0 then skip next instruction end ret jmp print_0x00_0xff + 1 |