In the following x86 assembly code:
dd 0x1BADB002
dd 0x00
dd - (0x1BADB002+0x00)
The values don't seem to be assigned to any variables. So what does this snippet of code do? I've heard something about it being stored in memory, but where exactly?
MOV EAX,4+3
and it will get automatically changed toMOV EAX,7
without you actually having to do so. This is handy for communicating the intent behind numeric constants (for example, in 68000 assembly where loops terminate at$ffff
instead of zero, it's common for the programmer to writeMOVE.W #32-1,D7
for a loop that is intended to execute 32 times.) – Catamite