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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

534 <strong>Digital</strong> <strong>Electronics</strong>counter <strong>and</strong> start executing instructions at that address, it is termed an unconditional jump. In thecase of a conditional jump, the program counter is loaded with a new instruction address only if<strong>and</strong> when certain conditions are established by the microprocessor after reading the appropriate statusregister bits. ‘Call’ instructions transfer the flow of the program to a subroutine. The ‘call’ instructiondiffers from the ‘jump’ instruction as ‘call’ saves a return address (the address of the program counterplus one) on the stack. The ‘return’ instruction returns control to the instruction whose address wasstored in the stack when the ‘call’ instruction was encountered. ‘Interrupt’ is a hardware-generated call(externally driven from a hardware signal) or a software-generated call (internally derived from theexecution of an instruction or by some internal event). Examples of transfer control instructions of the8085 microprocessor are as follows:JMP 16-bit addressJZ 16-bit addressJC 16-bit addressCALL 16-bit addressRETChange the program sequence to the location specified by the 16-bit addressChange the program sequence to the location specified by the 16-bit addressif a zero flag is setChange the program sequence to the location specified by the 16-bit addressif a carry flag is setChange the program sequence to the location of the subroutine specified bythe 16-bit addressReturn to the calling program13.4.5 Machine Control InstructionsMachine control instructions include HALT <strong>and</strong> NOP instructions. Machine control instructionsperformed by the 8085 microprocessor include the following:HLTNOPStop processing <strong>and</strong> waitNo operation13.5 Addressing ModesMicroprocessors perform operations on data stored in the register or memory. These data are specifiedin the oper<strong>and</strong> field of the instruction. The data can be specified in various ways as a direct data valueor stored in some register or memory location, <strong>and</strong> so on. These are referred to as the addressingmodes of the microprocessor. In other words, the addressing mode as expressed in the instruction tellsus how <strong>and</strong> from where the microprocessor can get the data to act upon. Addressing modes are ofdirect relevance to compiler writers <strong>and</strong> to programmers writing the code in assembly language.Different microprocessor architectures provide a variety of addressing modes. RISC microprocessorshave far fewer addressing modes than CISC microprocessors. The most commonly used addressingmodes are absolute, immediate, register direct, register indirect, indexed, program counter relative,implicit <strong>and</strong> relative addressing modes. They account for more than 90 % of the total addressing modes.13.5.1 Absolute or Memory Direct Addressing ModeIn absolute addressing mode, the data are accessed by specifying their address in the memory [Fig.13.5(a)]. This mode is useful for accessing fixed memory locations, such as memory mapped I/Odevices. For example, the instruction MOV A, 30H in the 8085 microprocessor moves the contents ofmemory location 30H into the accumulator [Fig. 13.5(b)]. In this case the accumulator has the value07H.

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

Saved successfully!

Ooh no, something went wrong!