Someone can tell me how to compare two arguments (RDI and RSI) in ASM x64 ?
I have a problem on compilation when I use:
cmp byte[rdi+rax],byte[rsi+rax]
I’m getting an error:
"error: invalid combination of opcode and operands"
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
cmpinstruction, like the majority of x86/x86-64 instructions, allows at most one memory operand. So, to compare contents of two memory locations, you need to load at least one of them into a register: