[fpc-pascal]dos approx delay fn that releases cpu

Thomas Schatzl tom_at_work at yline.com
Sat May 5 13:00:17 CEST 2001


Hello,

> Anyone know anything better than the code below (from John Stockton's
site),
> comments from [fpc-devel] , which releases cpu that will work for win95
and

[fpc-devel] ??

> win 2000? this is results so far from fpc developers...
>
> I've noticed that although this seems to work mostly in fpc dos
> program under win2000 it sometimes crashes & creates an exception...Under

Excerpt from the Intel docs:

The HLT instruction is a privileged instruction. When the processor is
running in protected or virtual-8086 mode, the privilege level of a program
or procedure must be 0 to execute the HLT instruction.

-> Should always exit a normal FPC program by force on NT.  (It does here)

NT uses that instruction in the idle process to lower CPU power consumption.
W9x doesn't.


Regards,
    Thomas





More information about the fpc-pascal mailing list