第一范文网 - 专业文章范例文档资料分享平台

ARM汇编语言程序设计总结

来源:用户分享 时间:2025/8/16 8:56:56 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

Rotate Right Extended (RRX)

Rotate right extended is encoded with RRX in the Op2 field. The value of the Carry flag (C) is shifted into bit 31. The shifted out bit 0 is written to C.

Binary operators

RealView Compilation Tools for μVision Assembler Guide

Version 4.0

Home > Assembler Reference > Expressions, literals, and operators > Binary operators Binary operators are written between the pair of subexpressions they operate on.

Binary operators have lower precedence than unary operators. Binary operators appear in this section in order of precedence.

Note

The order of precedence is not the same as in C, see Operator precedence in armasm and C.

Multiplicative operators

Multiplicative operators have the highest precedence of all binary operators. They act only on numeric expressions.

Table 3.9 shows the multiplicative operators. Table 3.9. Multiplicative operators

Operator Alias Usage Explanation Multiply Divide A modulo B * / :MOD: A*B A/B A:MOD:B % String manipulation operators

Table 3.10 shows the string manipulation operators. In CC, both A and B must be strings. In the slicing operators LEFT and RIGHT:

A must be a string

? B must be a numeric expression.

?

Table 3.10. String manipulation operators

Operator Usage Explanation B concatenated onto the end of A The left-most B characters of A The right-most B characters of A :CC: :LEFT: A:CC:B A:LEFT:B :RIGHT: A:RIGHT:B

Shift operators

Shift operators act on numeric expressions, shifting or rotating the first operand by the amount specified by the second. Table 3.11 shows the shift operators. Table 3.11. Shift operators

Operator Alias Usage Explanation Rotate A left by B bits Rotate A right by B bits Shift A left by B bits Shift A right by B bits :ROL: :ROR: :SHL: :SHR: A:ROL:B A:ROR:B A:SHL:B A:SHR:B << >> Note

SHR is a logical shift and does not propagate the sign bit.

Addition, subtraction, and logical operators

Addition and subtraction operators act on numeric expressions.

Logical operators act on numeric expressions. The operation is performed bitwise, that is, independently on each bit of the operands to produce the result. Table 3.12 shows addition, subtraction, and logical operators. Table 3.12. Addition, subtraction, and logical operators

Operator Alias Usage Explanation Add A to B Subtract B from A Bitwise AND of A and B Bitwise Exclusive OR of A and B Bitwise OR of A and B + - :AND: :EOR: :OR:

A+B A-B A:AND:B A:EOR:B A:OR:B & ^ | Relational operators

Table 3.13 shows the relational operators. These act on two operands of the same type to produce a logical value. The operands can be one of:

? ? ? ?

numeric

program-relative register-relative strings.

Strings are sorted using ASCII ordering. String A is less than string B if it is a leading substring of string B, or if the left-most character in which the two strings differ is less in string A than in string B.

Arithmetic values are unsigned, so the value of 0>-1 is {FALSE}. Table 3.13. Relational operators

Operator Alias Usage Explanation = > >= < <= /=

== A=B A>B A>=B A != A/=B Boolean operators

These are the operators with the lowest precedence. They perform the standard logical operations on their operands.

In all three cases both A and B must be expressions that evaluate to either {TRUE} or

{FALSE}.

Table 3.14 shows the Boolean operators. Table 3.14. Boolean operators

Operator Alias Usage Explanation Logical AND of A and B Logical Exclusive OR of A and B Logical OR of A and B :LAND: && :LEOR: :LOR:

A:LAND:B A:LEOR:B A:LOR:B ||

搜索更多关于: ARM汇编语言程序设计总结 的文档
ARM汇编语言程序设计总结.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c8sqmk15tju35m4y30uui_3.html(转载请注明文章来源)
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top