Link to home
Start Free TrialLog in
Avatar of dilipkumargift
dilipkumargift

asked on

8086 microprocessors time delay program

how can i write microprocessors 8086 instruction of 100 micro second delay with comment
Avatar of Mal Osborne
Mal Osborne
Flag of Australia image

Just do a big loop, possibly a nested one, with a heap of NOOPs.  Set it up as a subroutine and call it.
Why do I get the feeling this is someone's homework?
I don't think that there is a reliable way to do such a delay relying solely on the CPU.  In any real-world environment there are too many things to keep you from having predictable execution times for specific operations.

One approach is to read some sort of system clock from the hardware or OS and keep reading it until your desired time has passed.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.