September 14, 2017

Addressing mode of assembly code


□ Addressing : Identifying the operands of an instruction.

□ Implied addressing mode 묵시적 주소 지정
○ The mode that the operand is implicitly determined.
○ e.g. pop

□ Immediate addressing mode 즉시 지정 방식
○ The mode that the operand is actual data.
○ e.g. mov eax, 0x8
* 1 Byte range : 0x00~0xFF

□ Direct(or Absolute) addressing mode 직접 주소 지정 방식
○ The mode that the operand is an address having data.
○ e.g. mov eax, 0x703360E0 : 0x703360E0 has a value

□ Indirect addressing mode 간접 주소 지정 방식
○ The mode that the operand is an address pointing an address having data.
○ e.g. mov eax, [0x703360E1] : 0x703360E1 has an address and the address has a value

□ Register addressing mode 레지스터 지정 방식
○ The mode that the operand is a register.
○ e.g. mov ebp, eax
* 4 Bytes range : 0x00000000~0xFFFFFFFF

□ Register indirect addressing mode 레지스터 간접 주소 지정 방식
○ The mode that the operand is a register which has an address pointing an address having data.
○ e.g. mov eax, [ebp] : The ebp register has an address and the address has a value.

□ Index register addressing mode 인덱스 레지스터 주소 지정 방식
○ The mode that the operand is an address which is sum of the index register and the displacement.
○ e.g. mov eax, [esi+4]

□ Base register addressing mode 베이스 레지스터 주소 지정 방식
○ The mode that the operand is an address which is sum of the base register and the displacement.
○ e.g. mov eax, [ebp+4]

□ PC-relative addressing mode 상대 주소 지정 방식
○ The mode that the operand is an address which is sum of the program counter and the displacement.
○ e.g. mov eax, [eip+4]