SCR_public/23SCR/SCR019-ARM/small-loop.s

19 lines
237 B
ArmAsm
Raw Permalink Normal View History

2024-12-09 11:58:49 +01:00
.equ SYS_EXIT,93
.data
int: .word 12
.text
.globl _start
_start: adr x5, int
ldr w0,[25]
mov w1,#1
mov w2,#0
kfc : cmp w1,w0
b.gt suite
add w2,w2,w1
add w1,w1,#1
b kfc
suite : mov x0,x2
mov w8,#SYS_EXIT
svc #0
.end