Direct Addressing

5.3 Direct Addressing

Direct addressing is so named because the value to be stored in memory is obtained by directly retrieving it from another memory location. For example:

MOV A,30h

This instruction will read the data out of internal RAM address 30H (hex) and store it in the accumulator (A).

Direct addressing is generally fast because, although the value to be loaded is not included in the instruction, it is quickly accessible due to it being stored in the MSC1210 internal RAM. It is also much more flexible than immediate addressing because the value to be loaded is whatever is found at the given address, which may change.

Additionally, it is important to note that when using direct addressing, any in- struction that refers to an address between 00H and 7FH is referring to internal RAM. Any instruction that refers to an address between 80H and FFH is refer- ring to the SFR control registers that control the MSC1210 itself.

The obvious question that may arise is “if direct addressing an address from 80H through FFH refers to SFRs, how can I acess the upper 128 bytes of inter- nal RAM that are available with the MSC1210?” The answer is: it cannot be accessed using direct addressing. As stated, if an address of 80H through FFH is directly referred to, it refers to an SFR.

However, the upper 128 bytes of RAM of the MSC1210 can be accessed by using the next addressing mode, indirect addressing.

Addressing Modes

5-3

 

Page 57
Image 57
Texas Instruments MSC1210 manual Direct Addressing