534
Digital Electronics
counter and start executing instructions at that address, it is termed an unconditional jump. In the
case of a conditional jump, the program counter is loaded with a new instruction address only if
and when certain conditions are established by the microprocessor after reading the appropriate status
register bits. ‘Call’ instructions transfer the flow of the program to a subroutine. The ‘call’ instruction
differs from the ‘jump’ instruction as ‘call’ saves a return address (the address of the program counter
plus one) on the stack. The ‘return’ instruction returns control to the instruction whose address was
stored 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 the
execution of an instruction or by some internal event). Examples of transfer control instructions of the
8085 microprocessor are as follows:
JMP 16-bit address
Change the program sequence to the location specified by the 16-bit address
JZ 16-bit address
Change the program sequence to the location specified by the 16-bit address
if a zero flag is set
JC 16-bit address
Change the program sequence to the location specified by the 16-bit address
if a carry flag is set
CALL 16-bit address Change the program sequence to the location of the subroutine specified by
the 16-bit address
RET
Return to the calling program
13.4.5 Machine Control Instructions
Machine control instructions include HALT and NOP instructions. Machine control instructions
performed by the 8085 microprocessor include the following:
HLT Stop processing and wait
NOP No operation
13.5 Addressing Modes
Microprocessors perform operations on data stored in the register or memory. These data are specified
in the operand field of the instruction. The data can be specified in various ways as a direct data value
or stored in some register or memory location, and so on. These are referred to as the addressing
modes of the microprocessor. In other words, the addressing mode as expressed in the instruction tells
us how and from where the microprocessor can get the data to act upon. Addressing modes are of
direct relevance to compiler writers and to programmers writing the code in assembly language.
Different microprocessor architectures provide a variety of addressing modes. RISC microprocessors
have far fewer addressing modes than CISC microprocessors. The most commonly used addressing
modes are absolute, immediate, register direct, register indirect, indexed, program counter relative,
implicit and relative addressing modes. They account for more than 90 % of the total addressing modes.
13.5.1 Absolute or Memory Direct Addressing Mode
In 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/O
devices. For example, the instruction MOV A, 30H in the 8085 microprocessor moves the contents of
memory location 30H into the accumulator [Fig. 13.5(b)]. In this case the accumulator has the value
07H.
Digital Electronics
counter and start executing instructions at that address, it is termed an unconditional jump. In the
case of a conditional jump, the program counter is loaded with a new instruction address only if
and when certain conditions are established by the microprocessor after reading the appropriate status
register bits. ‘Call’ instructions transfer the flow of the program to a subroutine. The ‘call’ instruction
differs from the ‘jump’ instruction as ‘call’ saves a return address (the address of the program counter
plus one) on the stack. The ‘return’ instruction returns control to the instruction whose address was
stored 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 the
execution of an instruction or by some internal event). Examples of transfer control instructions of the
8085 microprocessor are as follows:
JMP 16-bit address
Change the program sequence to the location specified by the 16-bit address
JZ 16-bit address
Change the program sequence to the location specified by the 16-bit address
if a zero flag is set
JC 16-bit address
Change the program sequence to the location specified by the 16-bit address
if a carry flag is set
CALL 16-bit address Change the program sequence to the location of the subroutine specified by
the 16-bit address
RET
Return to the calling program
13.4.5 Machine Control Instructions
Machine control instructions include HALT and NOP instructions. Machine control instructions
performed by the 8085 microprocessor include the following:
HLT Stop processing and wait
NOP No operation
13.5 Addressing Modes
Microprocessors perform operations on data stored in the register or memory. These data are specified
in the operand field of the instruction. The data can be specified in various ways as a direct data value
or stored in some register or memory location, and so on. These are referred to as the addressing
modes of the microprocessor. In other words, the addressing mode as expressed in the instruction tells
us how and from where the microprocessor can get the data to act upon. Addressing modes are of
direct relevance to compiler writers and to programmers writing the code in assembly language.
Different microprocessor architectures provide a variety of addressing modes. RISC microprocessors
have far fewer addressing modes than CISC microprocessors. The most commonly used addressing
modes are absolute, immediate, register direct, register indirect, indexed, program counter relative,
implicit and relative addressing modes. They account for more than 90 % of the total addressing modes.
13.5.1 Absolute or Memory Direct Addressing Mode
In 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/O
devices. For example, the instruction MOV A, 30H in the 8085 microprocessor moves the contents of
memory location 30H into the accumulator [Fig. 13.5(b)]. In this case the accumulator has the value
07H.
