assembly - Very large address copied as negative value -


i going through binary file corresponding c program.
have large address stored in %eax.
when tried see value via gdb, prints negative value (reason here).

now when mov %eax, 0x4c(%esp) performed, resulted value in 0x4c(%esp) positive , negative. effect cmp $0, 0x4c(%esp) statement follows!

can please explain behavior?

if helps:
core: elf 32-bit lsb core file intel 80386, version 1 (sysv), svr4-style

registers not have signs; hold bits. it's how interpret them. same holds stack: holds bits, , it's how interpret them. if move value register stack, bits copied. , if interpret bits on stack interpret bits in register, same value.

note there are instructions interpret bits values - multiply, compare, etcetera. mov isn't 1 of those.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -