User:Assassin20X/Programming Instruction Formats: Low Level Languages

A machine code instruction has two main components:


 * Operation Code - specifies the operation to be performed


 * Operand Address - specifies the location of the operand used

Immediate Addressing

 * The operand is located in the address part of the instruction


 * The value of the operand is known at the time the program is written


 * e.g.


 * It is quick.


 * Once the instruction has been fetched, the operand is immediately available.

Direct Addressing (Absolute)

 * The location of the operand in memory follows the op-code.


 * e.g.


 * This is fast


 * The number of locations directly accessible is limited.

Indirect Addressing

 * 2 Stage Process


 * Provides the address of the address of the data


 * The address is a vector which points to the location of the data.


 * 2 memory accesses are required instead of 1