View Feed
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12764 Members
Join this group to post and comment.
swati verma
swati verma • Oct 26, 2008

What is the function of trap flag in 8086 microprocessor?

what is the function of trap flag in 8086 microprocessor?
swati verma
swati verma • Nov 1, 2008
Trap flag when set then single step interrupt will occur after the next instruction.
how to enable Trap flag? which instruction can do that?
rahul69 • Dec 26, 2012
Trieu Vi Nguyen There is no specific instruction to set Trap flag. However, u can set it by changing the Trap Flag Bit of the flags register.
Also, The Trap Flag is mainly used for debugging purposes.
Hope it helps!!!
Ankita Katdare
Ankita Katdare • Dec 31, 2012
More amazingly, this thread has thousands of views. It only goes to say engineers are searching for the basics and CE is providing them the answers. 👍

So, here's my two cents:
Trap Flag is used for on-chip debugging. Debuggers can use it for step-by-step execution of a computer program. If 8086 does a type-1 interrupt, Trap Flag is reset. Therefore, the single-step mode will be disabled during the interrupt-service procedure.

will any geek tell me what the hell on earth single step execution means ?

Share this content on your social channels -