What Is Direct Addressing Mode?
Addressing modes are conventions used in assembly language programming that specify how certain values are read within a given segment of assembly instructions. There are multiple possible modes, but they are based on the two most common: immediate and direct.
Immediate Addressing Mode
Immediate addressing mode means that the value for a given instruction in assembly programming is directly specified. This means the value is constant and written immediately and immutably into the instruction.
Common Format of Immediate Addressing
The following is an example of the format typically found with immediate addressing mode: Operator Target, ValueIn the example format, the value of the number Value is operated on the value stored in Target. Value is a constant value, which does not change no matter what occurs in the set of assembly instructions.
Direct Addressing Mode
Direct addressing mode means that the value for a given instruction in assembly programming is pointed to by a given value. This means the value is variable, based on what is stored in memory at a given address.
Common Format of Direct Addressing
The following is an example of the format typically found with direct addressing mode: Operator Target, (Address)In the example format, the value at the memory location of Address is a variable value in memory, which can be written to and read from during the course of a program. The location in memory is directly specified with a number, which will never change over the course of instruction execution.
There are many more addressing modes available, depending on the assembly language being used. These modes include Scaled, Deferred, Memory Deferred, Auto Increment and a variety of other types.