.text
.globl _start
_start:
mov r0, #0x1
mov r1, #0x1 @给r1加一固定1不变
mov r2, #0x64 @100判断
bl sum
cmp r1, r2
sum:
addcc r1, r1,#0x1 @r1自增
addcc r0, r0, r1 @r0求和
movcc pc,lr
stop:
b stop
.end
.text
.globl _start
_start:
mov r0, #0x1
mov r1, #0x1 @给r1加一固定1不变
mov r2, #0x64 @100判断
bl sum
cmp r1, r2
sum:
addcc r1, r1,#0x1 @r1自增
addcc r0, r0, r1 @r0求和
movcc pc,lr
stop:
b stop
.end