LECTURE_5 Program Control Instructions
LECTURE_5 Program Control Instructions
DURAME CAMPUS
Selamu S. (MSC)
LECTURE_5
Microprocessors are electronic devices that process digital information using instructions
stored in memory.
Machine control instructions are a type of instruction that control machine functions such
as Halt, Interrupt, or do nothing.
These instructions alter the different type of operations executed in the processor.
Machine control instructions have specific features that affect the microprocessor’s
operations.
Machine control instructions can have limitations that affect the performance and
reliability of microprocessors.
Flag Control Instructions
The 8086 microprocessor has a set of flags that either monitors the state of executing
instructions or controls options available in its operation.
The instruction set includes a group of instructions that. when executed, directly affect the
state of the flags.
HALT INSTRUCTION
The HLT instruction causes the 8086 to stop fetching and executing instructions.
The 8086 will enter a halt state.
The different ways to get the processor out of the halt state are with an interrupt signal on
the INTR pin, an interrupt signal on the NMI pin, or a reset signal on the RESET input.
The HLT instruction halts any further execution of instructions by the microprocessor.
The HLT instruction can cause the microprocessor to enter a wait state indefinitely, which
can impact the system’s responsiveness.
WAIT (WAIT FOR SIGNAL OR INTERRUPT SIGNAL)
When this instruction is executed, the 8086 enters an idle condition in which it is doing no
processing.
The 8086 will stay in this idle state until the 8086 TEST input pin is made low or until an
interrupt signal is received on the INTR or the NMI interrupt input pins.
If a valid interrupt occurs while the 8086 is in this idle state, the 8086 will return to the idle state
after the interrupt service procedure executes.
WAIT does not affect any flag.
The WAIT instruction is used to synchronize the 8086 with external hardware such as the 8087
Math coprocessor.
NOP (PERFORM NO OPERATION)
At the time of execution of NOP instruction, no operation is performed except fetch and decode.
It takes three clock cycles to execute the instruction.
This instruction simply uses up three clock cycles and increments the instruction pointer to point
to the next instruction
NOP does not affect any flag.
This instruction is used to fill in time delays or delete and insert instructions in the programs
while trouble shooting.
The NOP instruction does not affect the microprocessor’s state.