<<< Memory access syntax -- machine code | Index | Memory access syntax in C >>> |
On paper machine codes were often written with square brackets to delineate a memory location:
10001011 [ 11111000 ]
Modern Assembly languages retain square bracket notation:
mov eax, dword ptr [y] ; load y from memory into CPU register EAX
From the Assembly prospective, y is actually the location of variable y in memory:
mov eax, dword ptr [ 11111000b ]
Here, the little b at the end of the 11111000 tells the Assembly that this is a binary number.
<<< Memory access syntax -- machine code | Index | Memory access syntax in C >>> |