>>With a help of Ed (DXForth creator) the problem is recognized; Ed wrote:
>>   4DOS (or something associated with it) is setting PIT timer 0 
>> from mode 3 to
>>   mode 2 - which in turn is causing MS in DX-Forth to run slow.
> Nice find, didn't really expect that. Any hints in the sources as to 
> why they are fiddling with the timer?

my own sources say
; \sources\tomlib\mikro.asm  17.mai.87 tom
; routinen fuer precise zeitmessung auf PC/AT (quelle && idee BYTE 1'87 S.157)
; precision ca. +- 2 musec

timer mode 3

  for (;;) {
     count down ffff..0, set output high and trigger interrupt
     count down ffff..0, set output low

as each output high corresponds to one timer interrupt,
you see the values 0..ffff *twice* per timer interrupt;
so this mode is useless if you want have better then 50 msec
resolution for events possibly longer then 25 msec

timer mode 2

  for (;;) {
     count down ffff..0, trigger interrupt
can be used across a timer interrupt, with 0.86 micro second resolution

unfortunatrely, IBM in their infinite wisdom initialized the original
PC/AT timer in mode 3, for whatever reason


Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
Freedos-user mailing list

Reply via email to