-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isalpha.s
37 lines (33 loc) · 1.24 KB
/
ft_isalpha.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# **************************************************************************** #
# #
# ::: :::::::: #
# ft_isalpha.s :+: :+: :+: #
# +:+ +:+ +:+ #
# By: vtarasiu <[email protected]> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2019/07/18 21:54:14 by vtarasiu #+# #+# #
# Updated: 2019/07/18 22:06:04 by vtarasiu ### ########.fr #
# #
# **************************************************************************** #
global ft_isalpha
global _ft_isalpha
ft_isalpha:
_ft_isalpha:
push rbp
mov rbp, rsp
cmp rdi, 65
jl .isalpha_fail
cmp rdi, 90
jle .isalpha_succ
cmp rdi, 97
jl .isalpha_fail
cmp rdi, 122
jg .isalpha_fail
.isalpha_succ:
mov rax, 1
jmp .isalpha_over
.isalpha_fail:
mov rax, 0
.isalpha_over:
pop rbp
ret