[英]MSP430 JC, JNC , JEQ and JNZ
我在查看 MSP430 的指令集时偶然发现了一些我不太明白的东西。 我似乎无法区分JC
和JNZ
以及JNC
和JEQ
之间的区别。 我了解JEQ
和JNZ
的功能,但对JC
和JNC
的用法有点模糊。
我知道JC
和JNC
使用进位标志,但我不确定它的使用方式以及它们与JNZ
和JEQ
不同之处。
JC = Jump if carry set (C=1)
JNC = Jump if carry is not set (C=0)
JZ = Jump if zero-flag is set
JNZ = Jump if zero-flag is not set
JEQ = Jump if equal => another 'name' for JZ
(There are many instruction aliases').
当您将两个设置了最高位的数字相加时,您最终会得到比原始数字长一位的结果。 这个新的位“去”携带。 它也用作减法中的借用标志。 比较与减法相同,只是不存储结果值。
这就是 SBC 对标志所做的事情:
Status Bits N: Set if result is negative, reset if positive
Z: Set if result is zero, reset otherwise
C: Set if there is a carry from the MSB of the result, reset otherwise.
Set to 1 if no borrow, reset if borrow.
V: Set if an arithmetic overflow occurs, reset otherwise.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.