Addressing method

honggarae 19/07/2022 611

Embodiment

Introduction

in a memory operand or an instruction word read or write, the address specified manner, and stacks associated storage access mode. Almost all computers, are used in memory address specified way. When the address specified manner, or is formed operand addressing mode called instruction addresses. Addressing fall into two categories, i.e. instruction addressing and data addressing mode, the former is relatively simple, the latter is more complicated. It is noted that, in a conventional manner designed computer, the addressing of data in memory addressing and command are carried out alternately.

instruction addressing

addressing mode instructions following two.

sequential addressing mode

Since the instruction address in memory sequentially arranged, when executing a program, an instruction is normally ground to an instruction sequence. That is, the first instruction is fetched from memory, and this instruction is executed; then removed from the second instruction memory, then execute a second instruction; instruction followed by a third extraction.

This program order execution, called sequential addressing mode instructions. To do this, you must use a program counter (also called Instruction Counter ) PC instructions to count the sequence number, the sequence number is the instruction address in memory.

jump addressing

When the procedure is shifted sequentially, to take the address of the jump instruction addressing. The so-called jump, refers to a given instruction code is not the address of the program counter, but this section is given by the instruction. Note that the program jump, according to the new location and begin execution of the instruction sequence. Thus, the contents of the program counter must also be changed in order to track timely new instruction address.

Addressing method

using jump instruction addressing, transfer or program may be implemented configuration cycle program, the program length can be shortened, certain programs or program as a common reference. Instruction in various conditions or unconditional branch instruction, a jump is to achieve a set of instruction addressing.

Note that if the number of jumps may be controlled operation of status register, and the jump address into an absolute address (obtained directly from the tag) and a relative address (instruction address for the current offset), jump command to modify the current result value of the program counter PC, the next instruction is still given by the program counter PC. Method

operand addressing

to form an effective address of the operand addressing mode of the operand referred to. Due to the different mainframes, minicomputers, and microcomputers microcontroller structure, thereby forming a variety of different operand addressing mode. Here are some typical and common operand addressing mode.

implied addressing

This type of instruction is not clearly given address of the operand. But implies address of the operand in the instruction. For example, single-address instruction format, is not clearly indicated the second operand address in the address field, but a predetermined AC accumulation register address as a second operand. Instruction format is clearly noted that only the address of the first operand D. Accordingly, accumulator registers AC single-address instruction format is implicit address. Such as: DAA;

immediate addressing

address is not the address of the instruction operand field indicates, but the operand itself, this addressing is called immediate addressing. It features immediate addressing mode is an instruction execution time is very short, because it does not take the number of memory access, thus saving memory access time. Such as: MOV AX, # 5678H Note: number only as a source operand, a destination operand is not immediate.

directly addressable

is a basic direct addressing addressing method, which is characterized by: an operand address in memory indicated directly in the address field in instruction format. Since the address of the operand is given directly without going through a transformation, this so called direct addressing mode addressing. Given directly involved in computing in the instruction operands and operation results are stored in the main memory address, i.e., the effective address is given

directly in the instruction

Indirect

indirection direct addressing is relative terms, in the case of indirect addressing, the instruction address field in the form of real address is not the address number of operations, but the indicator operand address, or the address of the cell of this form is effective address of the operand.

register addressing and register indirect addressing mode

When an operand is not in memory, but on the general-purpose register of the CPU, the register addressing mode may be employed . Obviously, the operand address is not at this time given the instruction memory address unit number, but the number of general purpose registers (8 may be 16 bits (AX, BX, CX, DX)). RR-type instruction in the instruction structure, is an example of using register addressing mode. Such as: MOV DS, AX

difference

register indirect addressing mode and in that the register addressing mode: the instruction register contents of the operand is not in a format, but the address of the operand, the number of operations specified in the address in memory.

relative addressing mode

is the relative addressing contents of the program counter PC plus D form the address instruction format form the effective address of the operand. The contents of the program counter is the address of the current instruction. "Relative" address is relative to the current instruction address concerned. The benefits of using relative addressing mode is absolutely no need to address programmer programming instructions, which are programmed can be placed anywhere in memory. Instruction Format: MOV AX, [BX + 1200H] number of the physical address operation PA = (DS / SS) * 16H + EA EA = (BX / BP / SI / DI) + (6/8) bits for offset Disp BX , SI, DI register default segment register for the DS, for BP, the default segment register SS

Indexed addressing mode

in the group indexed addressing mode contents of the base register of the CPU, the contents of index register coupled to form the effective address of the operand. Advantage is based addressing can be expanded addressing capability, as compared with the form of address bits of the base address register can be set very long, can be addressed in a larger storage space.

indexed addressing mode

Indexed Addressing Method Indexed addressing mode and manner effective address calculation is similar, in which the contents of a CPU register and index D is formed by adding the offset operand effective address.

but the purpose is to use indexed addressing mode address space is not enlarged, but is to realize the variation of the block. For this purpose, the contents of index register must be implemented with a regular change (e.g., incremented by one, from minus 1, multiplied by the scale factor) without changing the instruction itself, so the effective address is implemented by a regular change of the contents of index register .

block addressing mode

block addressing mode is often used in the input and output command to implement block transfers of data between the external memory or peripheral devices with memory. In memory block addressing mode can be used for moving data blocks.

Latest: Oliver Stewaz

Next: Roman Academy of Fine Arts, Italy