43 common data addressing methods

1. Implicit addressing: In this type of instruction, the address of the operand is not explicitly given, but the address of the operand is implicit in the instruction. For example, the single-address instruction format does not clearly indicate the address of the second operand in the address field, but specifies the accumulator ACC as the second operand address. The instruction format clearly indicates only the address of the first operand. Therefore, the accumulator ACC is an implicit address for the single-address instruction format, as follows
Insert picture description here

2. Immediate (number) addressing: The address field of this type of instruction does not indicate the address of the operand, but the operand itself, which is also called an immediate value. The data is stored in the form of complement. As follows, for immediate addressing, # in the figure represents the immediate addressing feature, A is the operand itself
Insert picture description here

3. Direct addressing: The formal address A in the instruction word is the real address EA of the operand, that is, EA=A, as follows: The advantage of direct addressing is simple, the instruction only accesses the main memory once during the execution stage, and no special calculation is required The address of the operand; the disadvantage is that the number of bits of A determines the addressing range of the operand of the instruction, and the address of the operand is not easy to modify

Insert picture description here

4. Indirect addressing: Indirect addressing is relative to direct addressing. The formal address given by the address field of the instruction is not the real address of the operand, but the address of the storage unit where the effective address of the operand is located, that is, the operation The address of the number address, namely EA=(A), is as follows: Indirect addressing can be one indirect addressing or multiple indirect addressing.
Insert picture description here
Insert picture description here

5. Register addressing
Insert picture description here

6. Register indirect addressing
Insert picture description here

7. Relative addressing: Relative addressing is to add the content of the program counter PC to the formal address A in the instruction format to form the effective address of the operand, ie EA=(PC)+A, where A is relative to the current instruction address The displacement of, can be positive or negative, expressed in complement, as follows:
Insert picture description here
Insert picture description here

8. Base addressing
Insert picture description here

Insert picture description here

Insert picture description here

9. Indexed addressing
Insert picture description here

10. Stack addressing
Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_41883890/article/details/112918945