Explain what the following instruction does movb 17 ebpSolut
Explain what the following instruction does.
movb $17, (%ebp)
Solution
movb $17,(%ebp):
We may understand the working of this statement by breaking this up:
movb -> this statement is used to move a byte from source to destination.
$17 -> the source value
%ebp - > the destination value. Note that the value is not being stored in the ebp register. Instead, it will be moved to the address location which this register currently holds.
Hence, as a result, the instruction will move the byte with the value 17 to the memory location whose address is stored in ebp register.
