Featured

    Featured Posts

Explain NOP and HLT instructions in 8086 microprocessor in detail.


Explain NOP and HLT instructions in 8086 microprocessor in detail.

NOP instruction :


Mnemonic
NOP : No operation
It does not affect any flag
Algorithm
DO nothing

Addressing Mode
Implied addressing mode


Operation : The execution of this instruction causes the CPU to do nothing.

  1. This instruction causes the CPU to do nothing. This instruction uses three clock cycles and increments the instruction pointer to point to the next instruction.
  2. It can be used to increase the delay of a delay loop.
HLT (Halt until interrupt or reset) Instruction :-

Mnemonic  Halt     Flags : No flags are affected.

Operation :
  1. The HLT instruction will cause the 8086 enters to stop fetching and executing instructions. The 8086 enters into a half state. To come out of the halt state, there are 3 ways given below. (a) Interrupt signal on INTR pin, (b) Interrupt signal on NMI pin, (c) Reset signal on rest pin.
  2. It may be used as an alternative to an endless software loop in situation where a program must wait for an interrupt.

Post a Comment

www.CodeNirvana.in

www.posthatke.com. Powered by Blogger.

Google+ Followers

Copyright © www.posthatke.com | Blogger Templates | Designed By posthatke.com