- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
ARM_Assembly_language_programming汇
* * ARM Assembly language programming Agenda ARM Data processing instructions ARM Data transfer instructions Arm Control flow instructions Features of Thumb state ARM uses three types of instructions Data processing instructions (arithmetic operations, logical operations, register moves , comparisons, shift operations). Data transfer (register load/store instructions). Control flow instructions (branch instructions). Data processing instructions Rules apply to ARM data processing instructions : - All operands are 32 bit s , come either from registers or aas specified as constants in the instruction itself - The result is also 32 bits and is placed in a register. - 3 operands are used : 2 for inputs and 1 for result. Ex. : ADD r0,r1,r2 ; r0 = r1 + r2 Works for both unsigned and 2’s complement signed numbers. This may produce carry out signal and overflow bits , but ignored by default Result register can be same as an input operand register. Data processing instructions (cont’d) ARM’s basic arithmetic operations : ADD r0,r1,r2 ; r0 = r1 + r2 ADC r0,r1,r2 ; r0 = r1 + r2 +C SUB r0,r1,r2 ; r0 = r1 – r2 SBC r0,r1,r2 ; r0 = r1 – r2 + c + 1 RSB r0,r1,r2 ; r0 = r2 – r2 RSC r0,r1,r2 ; r0 = r2 – r1 + c - 1 RSB stands for reverse subtraction. Operands may be unsigned or 2’s complement integers. ‘C’ is the carry bit in the CPSR Data processing instructions (cont’d) ARM’s bit-wise logical operations : AND r0,r1,r2 ; r0 = r1 and r2 ( bit-by-bit for 32 bits) ORR r0,r1,r2 ; r0 = r1 or r2 EOR r0,r1,r2 ; r0 r1 xor r2 BIC r0,r1,r2 ; r0 = r1 and not r2 BIC stands for ‘bit clear’, where every ‘1’ in the second operand clears the corresponding bit in the first : r1 : 0101 0011 1010 1111 1101 1010 0110 1011 r2 : 1111 1111 1111 1111 0000 0000 0000 0000 r0 : 0000 0000 0000 0000 1101 1010 0110 1011 Data processing instructions (cont’d) ARM’s register move operations : MOV r0,r2 ; r0 = r2 MVN r0,r2 ; r0 = not r2 MV
您可能关注的文档
最近下载
- 2025《水下清淤机器人的结构方案设计》13000字(论文).docx
- [硕士]宣钢近北庄铁矿滑坡机理及稳定性分析.pdf VIP
- 2025年“三新”协同教研共同体高一联考英语试卷及答案.docx VIP
- 中国海洋(大学)高等代数历年考研试题.pdf VIP
- 856高等代数之中国海洋(大学)(2018至2021)考研真题.pdf VIP
- 2020-2021学年安徽省合肥市长丰县杨公镇朱集中学高一数学理下学期期末试卷含解析.docx VIP
- PLC西门子S7-200温度控制系统毕业设计-使用教程.pdf VIP
- 新22S3 室外排水工程建筑工程图集.docx VIP
- 江苏省姜氏宗亲分布村落.docx
- 2025年北京理工大学计算机科学与技术专业《操作系统》科目期末试卷及答案.docx VIP
原创力文档


文档评论(0)