Skip to content

Commit

Permalink
Create ficha3_ex4.s
Browse files Browse the repository at this point in the history
  • Loading branch information
kiko-serra committed Apr 19, 2022
1 parent 724190d commit 6bbc8ad
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions ficha3_ex4.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.text
.global CheckABS
.type CheckABS,"function"

CheckABS:
mov w4, 0
ciclo:
cbz w1, fim
ldr w5, [x2]
cmp w5, 0
b.gt pos
neg w5, w5
pos:
cmp w0, w5
b.ge prox
mov w5, 0
str w5, [x2]
add w4, w4, 1
prox:
add x2, x2, 4
sub w1, w1, 1
b ciclo
fim:
mov w0, w4
ret

0 comments on commit 6bbc8ad

Please sign in to comment.