DAY2,ARM(特殊功能寄存器,数据操作指令,跳转指令)

1.cmp、sub、b指令的使用;

代码:
复制代码
.text
.global _start
_start:
	
	mov r0,#9
	mov r1,#15
	
loop:
	cmp r0,r1
	beq stop
	subcc r1,r1,r0
	subhi r0,r0,r1
	
	b loop
	
stop:
	b stop
.end
结果:

2.汇编指令计算1~100之间和;

代码:
复制代码
.text
.global _start
_start:

	mov r0,#0x1  @赋值
	mov r1,#0x0  @累加器

loop:	
	cmp r0,#0x64
	bhi stop  @跳出循环
	addls r1,r1,r0  @r1累加
	addls r0,r0,#0x1  @r0加1
	
	b loop

stop:
	b stop
.end
结果:

3.今日思维导图;

相关推荐
secondyoung9 小时前
Cortex-R52学习:存储系统
arm开发·单片机·学习·arm
c++之路12 小时前
C++跨平台(九):跨平台字节序统一处理
开发语言·arm开发·c++
AndyHeee18 天前
【SVC、PendSV(系统异常) 与 外设 IRQ 、NVIC笔记】
arm开发
暮云星影18 天前
瑞芯微rk3588利用Rockchip NPU运行大语言模型(LLM)
arm开发·人工智能·语言模型·自然语言处理
techdashen18 天前
绕过系统 ICMP:用 rawsock、Npcap 和 WMI 找到默认网卡
开发语言·arm开发·rust
振南的单片机世界18 天前
ARM中断比51快在哪?硬件压栈+NVIC集中管理
arm开发·stm32·单片机·嵌入式硬件
墨绿色的摆渡人18 天前
论文笔记(一百三十七)Learning Dual-Arm Push and Grasp Synergy in Dense Clutter
arm开发·论文阅读
暮云星影18 天前
全志linux开发屏幕适配(一)屏幕参数设置说明
linux·arm开发
m0_5474866619 天前
《ARM Cortex-M4嵌入式应用技术——基于STM32F407、STM32CubeMX与Proteus》全套PPT课件
arm开发·stm32·proteus
Lanceli_van19 天前
SQLite 3.45.2(sqlite-autoconf-3450200)ARM 交叉编译完整步骤
arm开发·sqlite