SCR/ARM/tp19.s
2023-05-26 13:48:24 +02:00

29 lines
340 B
ArmAsm

.equ SYS_EXIT,93
.data
int1: .word 0xa2
int2: .word 0xb
.text
.globl _start
_start:
adr x5,int1
ldr x0,[x5]
uxtw x1,x0
adr x5,int2
ldr x0,[x0]
uxtw x2,x0
mov x0,#0
loop: cbz x2, exit
tbz x2, next
add w8, w8, x1
next: lsl x1, #1
lsr x2, #1
b loop
exit: mov x0,#0
mov w8,#SYS_EXIT
svc #0x0
.end