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!

Categories

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?

Comments

  • 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.