逻辑指令集有: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 |
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 |
3)比较指令:CMP / CMN /TST / TEQ
时间: 2024-10-23 04:34:36