Possible Duplicate:
what does movsbl instruction do?
Related: what does movsbl instruction do?
Upon disassembling a program, I found a really peculiar instruction:
0x0000000000401106: movsbl (%rbx,%rax,1),%ecx
I think I know what movsbl does: It basically extends a byte and adds leading ones (sign extended) to the register.
But I have absolutely no clue what it does when it is used in the above context.
Any light to shed on this instruction would be most appreciated!
The instruction
reads one byte from the memory location addressed by the first operand, sign extends the byte to 32 bits, and stores the result in the
ecxregister.Now to
<%rbx,%rax,1>. This simply denotes the memory address formed by adding together the values ofrbxandrax. In case you’re wondering, the1is the multiplier applied torax.