Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- read_word:
- xor r8, r8
- .loop:
- call read_char
- test rax, rax
- jz .exit
- cmp rax, 0x21
- js .loop
- mov rsi, word_buffer
- mov byte[word_buffer], al
- jmp .secloop
- .secloop:
- inc r8
- mov rdx, 1
- xor rdi, rdi
- xor rax, rax
- lea rsi, [word_buffer + r8]
- syscall
- cmp byte[word_buffer + r8], 0x21
- js .exit
- jmp .secloop
- .exit:
- mov byte[word_buffer + r8], 0x00
- mov rdx, r8
- mov rax, word_buffer
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement