Created
April 4, 2019 18:32
-
-
Save vtlmks/770b9cc0ebb99690928dfd7adb9ee5ab to your computer and use it in GitHub Desktop.
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
memcmp Cld | |
Mov r10, rdi ; save | |
Mov r11, rsi ; save | |
Mov rdi, rcx | |
Mov rsi, rdx | |
Mov rcx, r8 | |
Mov rdx, r8 | |
Xor eax, eax | |
Cmpsb | |
Je .done | |
.not_equal: Mov al, [rdi-1] ; check the last bytes | |
Movzx ecx, byte [rsi-1] | |
Sub eax, ecx | |
.done Mov rdi, r10 | |
Mov rsi, r11 | |
Ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment