Steve
Steve

Reputation: 89

In assembly what are the hex values next to the <main> lines?

I am beginning to learn assembly and I couldn't find the answer to this online. I understand the basic commands on the right, but I don't get whats going on on the left.

Obviously <main+x> tells you what line of assembly code in your main function are executing, but what is the hex value to the very far left? Is it supposed to be an address? But the different lines are not 4 apart and all these things wouldn't be pushed on the stack right?

Does anyone know what 0x080483bf represents?

Thank you!

0x080483bf <main+0>:    push   ebp
0x080483c0 <main+1>:    mov    ebp,esp
0x080483c2 <main+3>:    push   ecx

Upvotes: 1

Views: 594

Answers (1)

Martin Rosenau
Martin Rosenau

Reputation: 18493

Does anyone know what 0x080483bf represents?

This is the absolute address where the machine code instruction is located in memory.

Obviously tells you what line of assembly code ...

Wrong. The "x" is the relative address:

This means that the address of this instruction is calculated by the address of the first instruction of plus the value x:

0x080483bf + 3 = 0x080483c2

Upvotes: 4

Related Questions