簡體   English   中英

MSP430 JC、JNC、JEQ 和 JNZ

[英]MSP430 JC, JNC , JEQ and JNZ

我在查看 MSP430 的指令集時偶然發現了一些我不太明白的東西。 我似乎無法區分JCJNZ以及JNCJEQ之間的區別。 我了解JEQJNZ的功能,但對JCJNC的用法有點模糊。

我知道JCJNC使用進位標志,但我不確定它的使用方式以及它們與JNZJEQ不同之處。

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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM