22 lines
269 B
NASM
22 lines
269 B
NASM
global ft_isspace
|
|
section .rodata
|
|
ws_chars db ' ',9,10,13,11,12
|
|
|
|
section .text
|
|
; input: dil
|
|
ft_isspace:
|
|
lea r10, [rel ws_chars]
|
|
mov rcx, 6
|
|
.loop:
|
|
cmp dil, [r10]
|
|
je out_is_space
|
|
inc r10
|
|
loop .loop
|
|
|
|
out_not_space:
|
|
xor rax, rax
|
|
ret
|
|
out_is_space:
|
|
mov rax, 1
|
|
ret
|
|
|