.text

.global  _start

_start:

          mov r1,#2

          cmp  r1,#1

          bl func1    @bl能保存下一条指令的位置到lr寄存器里面,b不能

          mov  r1, #2

          cmp r1, #3

          func1:

          mov r1,#2

          mov r2,#3

          mov pc,lr     @PC指针的变化在函数调用返回时很重要

 

相关文章:

  • 2021-06-25
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
  • 2021-06-04
  • 2021-06-23
猜你喜欢
  • 2021-11-13
  • 2021-09-10
  • 2022-12-23
  • 2021-11-03
  • 2022-12-23
  • 2021-12-04
  • 2022-02-07
相关资源
相似解决方案