I am having trouble understanding what the following assembly lines do:
0x401810: repz cmps BYTE PTR ds:[rsi],BYTE PTR es:[rdi]
0x401812: seta dl
0x401815: setb al
I understand that after debugging, the first instruction compares the bytes in the registers rsiand rdi, byte by byte.
Then it sets the lower bytes rdxand raxin accordance with this instruction.
My confusion, when I looked at this instruction online, I said that it setasets the low byte to 0x01 if its value is above a certain value, otherwise its 0x00. Similarly for setb, which sets the byte to 0x01, if its below a certain value.
My question is what is the meaning and how is it related to the above instruction?
source
share