Download presentation
Presentation is loading. Please wait.
Published byAvice Caldwell Modified over 8 years ago
1
IA32 addressing modes 1.Immediate 2.Direct memory 3.Register 4.Register indirect 5.Indexed 6.Based-indexed
2
addressing Opcode indicates what operation is to be performed. Operands specify the location of data. Example of addressing modes that we have already used: A=12 Bdword52 moveax, 1; immediate movebx, eax; register movecx, A; immediate movedx, B; direct memory
3
Register indirect Say B is located at memory location (address) 400. We load the address of B into a register. movebx, 400;load the address of B moveax, ebx;eax is now 400 moveax, [ebx];eax now equals 52 This is the register indirect addressing mode. The register does not contain the value but contains a reference to (pointer to/location of) the value in memory.
4
Indexed Used to: 1.reference memory at a constant offset from a register when register points to object and data member is a know offset from start of object 2.reference memory using a register as an additional offset when register is used as an offset to an array element
5
Indexed Adword592h, 50h, 60h, 70h, 80h, 90h moveax, 4 movebx, A[eax];what’s in ebx? movecx, [A+eax];what’s in ecx?
6
Indexed Adword592h, 50h, 60h, 70h, 80h, 90h moveax, 4 movebx, A[eax];what’s in ebx? movecx, [A+eax];what’s in ecx?
7
Based-indexed
8
Make a sum
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.