X86 ASSEMBLER: Question About Operations

I have this line using Intel syntax:

[code]add [eax], dl[/code]

Let's say the address stored in EAX is 0. Pretty simple. Okay, and the value at [EAX] is 0xFFFFFFFF. Register DL is 1. What's going to happen to the value at [EAX]? Will just the first byte change to 0, or will it extend out to other bits?


  • Only the first byte will change to 1 in this case.

    How much is changed depends on the size of the second operand. DL is 8 bits, so just one byte is changed. If it were EDX (and EDX = 1), then the entire dword(4 bytes) would be changed to a value of 1.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion