1.2.4 Types of Programming Language – Modes of Addressing Memory

Immediate Addressing

This is when the actual value is used in the operand. (SUB 15 would actually subtract 15 from the value in the accumulator)

Direct Addressing

This is when the memory location is used in the operand. (SUB 15 would get whatever is in memory location 15 from the value in the accumulator).

Indirect Addressing

This is when a memory location  is stored in the operand, but the memory address contains the memory address of the needed data. (SUB 15 means go to memory location 15,  then go to the address found in memory location 15, and take it away from the number in the accumulator).

This may be used to access larger addresses, which are otherwise unusable due to the number of bits avaialable.

Indexed Addressing

If you’re repeating the same instruction multiple times, you can set an index register and then add 1 each time to get the new data.

Set the index register to 0 for the first item, and then add 1 to it for each time the instruction is repeated.

For example: SUB 15, SUB 16, SUB 17, SUB 18.

SUB 15 would be index 0, SUB 16 index 1, etc, etc.