19 lines
237 B
ArmAsm
19 lines
237 B
ArmAsm
|
.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
|