-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
724190d
commit 6bbc8ad
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |