2.1.1.1.1. Absolute Addressing Example

Declaring and accessing a global variable in C.

static int i;           // declare a global variable
...
i = 0x12345678;         // access the global variable

The C code compiled into Intel 80x86 assembler.

.comm i,4,4             ;declare i as 4 bytes aligned at 4 bytes boundary
...
movl $0x12345678,i      ;write value 12345678h into target address i

The assembler code compiled into Intel 80x86 machine code.

C705                    ;movl
C0950408                ;target address 080495C0h
78563412                ;value 12345678h