13.07.2015 Views

Digital Electronics: Principles, Devices and Applications

Digital Electronics: Principles, Devices and Applications

Digital Electronics: Principles, Devices and Applications

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Microprocessors 535OperationAddressMemoryData(a)MOV A,30H09H07H22H31H30H29H(b)Figure 13.5Absolute addressing mode.OperationDataFigure 13.6Immediate addressing mode.13.5.2 Immediate Addressing ModeIn immediate addressing mode the value of the oper<strong>and</strong> is held within the instruction itself (Fig. 13.6).This mode is useful for accessing constant values in a program. It is faster than the absolute addressingmode <strong>and</strong> requires less memory space. For example, the instruction MVI A, #30H moves the datavalue 30H into the accumulator. The sign # in the instruction tells the assembler that the addressingmode used is immediate.13.5.3 Register Direct Addressing ModeIn register direct addressing mode, data are accessed by specifying the register name in which theyare stored [Fig. 13.7(a)]. Operations on registers are very fast, <strong>and</strong> hence instructions in this moderequire less time than absolute addressing mode instructions. As an example, the instruction MOV A,R1 in the 8051 microprocessor moves the contents of register R1 into the accumulator [Fig. 13.7(b)].The contents of the accumulator after the instruction are 06H.13.5.4 Register Indirect Addressing ModeIn all the modes discussed so far, either the value of the data or their location is directly specified. Theindirect addressing mode uses a register to hold the actual address where the data are stored. That is,in this case the memory location of the data is stored in a register [Fig. 13.8(a)]. In other words, inindirect addressing mode, the address is specified indirectly <strong>and</strong> has to be looked up. This addressingmode is useful when implementing the pointer data type of high-level language.In the 8085 microprocessor, the R0 <strong>and</strong> R1 registers are used as an eight-bit index <strong>and</strong> the DPTR asa 16-bit index. The mnemonic symbol used for indirect addressing is @. As an example, the instruction

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!