X86 ASSEMBLER: Question About Operations - Programmers Heaven

Howdy, Stranger!

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


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

X86 ASSEMBLER: Question About Operations

saxman727saxman727 Posts: 8Member
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?


  • anthrax11anthrax11 Posts: 511Member
    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.