首页 > 代码库 > 【汇编指令】数据处理指令之逻辑指令
【汇编指令】数据处理指令之逻辑指令
逻辑指令集有:AND/ORR/EOR/BIC
1)与逻辑指令一般用于置零某位:AND
AND
Logical AND operation.
Syntax | AND{cond}{S} Rd, Rn, Op2 | |
Description | Load Rd with logical AND of Rn with Op2. Rd := Rn AND Op2 | |
Condition Flags | If S is specified, N, Z flags are updated. C flag may be updated by calculation of Op2. | |
Example | AND R9,R2,#0xFF00 // Load R9 with R2 and value in 0xFF00 |
<script src="https://code.csdn.net/snippets/547236.js" type="text/javascript"></script>
2)逻辑或指令:ORR(或逻辑一般用于某位的置 1 )
ORR
Logical OR operation.
Syntax | ORR{cond}{S} Rd, Rn, Op2 | |
Description | OR operations on the values in Rn and Op2. | |
Condition Flags | If S is specified, N, Z flags are updated. C flag may be updated by calculation of Op2. | |
Example | ORR R2, R0, R5 // Rd = R0 or R5 |
<script src="https://code.csdn.net/snippets/547258.js" type="text/javascript"></script>
3)比较指令:CMP / CMN /TST / TEQ
<script src="https://code.csdn.net/snippets/547284.js" type="text/javascript"></script>
【汇编指令】数据处理指令之逻辑指令
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。