.text
.global _gcd
_gcd:mov r0,#9mov r1,#15b loop
loop:cmp r0,r1beq stopsubhi r0,r1bhi loopsubcc r1,r0bcc loopstop:b stop.end
用for循环实现1~100之间和5050
.text
.global _gcd
_gcd:mov r0,#0x0mov r1,#0x1mov r2,#0x64b loop
loop:cmp r1,r2bhi stopadd r0,r0,r1add r1,#0x1b loopstop:b stop.end