CLOSE
Updated on 27 Jul, 20253 mins read 77 views

Memory Addressing Mode

Memory addressing modes define various techniques for specifying the location of data operands in memory. These modes encompass a range of strategies, including direct, indirect, indexed, and base-plus-index addressing.

1 Direct Addressing:

Intel Syntax:

mov eax, [address]

Retrieves the value stored at the memory address specified by address and loads in into the eax register.

AT&T Syntax:

movq (%rdi), %rax

2 Indirect Addressing:

Intel Syntax:

mov eax, [ebx]

Retrieves the value stored at the memory address contained in the ebx register and loads it into the eax register.

3 Indexed Addressing

Intel Syntax:

mov eax, [ebx + ecx * 2]

Computes the effective address by adding the contents of ebx and twice the value of ecx, retrieves the value stored at that address, and loads it into the eax register.

Leave a comment

Your email address will not be published. Required fields are marked *