DJGPP - how to make timeout in loop when interrupt disabled? (Developers)
> Hi,
> does someone know how to make a timeout in a loop executing during
> interrupt disabled (CLI)?
Hey, you're in a DOS board! We know everything!
> Timeout would be about 1sec but it shouldn't be
> dependent on CPU speed. I cannot use clock/uclock/delay functions when
> interrupt disabled. It should also work under win9x.
I guess that "Timeout" means that you want to wait for a certain amount of time. With interrupts disabled this can be done by scanning the "keyboard controller port B control register" (port 0061h), bit 4, which toggles with each "refresh cycle".
If this doesn't work in Win9x, you can also consider to read the PIT timer values directly (ports 40h-43h), since it counts down with a fix frequency.
---
MS-DOS forever!
Complete thread:
- DJGPP - how to make timeout in loop when interrupt disabled? - RayeR, 22.04.2008, 02:08 (Developers)
- DJGPP - how to make timeout in loop when interrupt disabled? - Japheth, 22.04.2008, 10:33
- DJGPP - how to make timeout in loop when interrupt disabled? - RayeR, 22.04.2008, 11:34
- DJGPP - how to make timeout in loop when interrupt disabled? - Japheth, 22.04.2008, 12:41
- DJGPP - how to make timeout in loop when interrupt disabled? - RayeR, 22.04.2008, 14:04
- DJGPP - how to make timeout in loop when interrupt disabled? - Ninho, 22.04.2008, 12:42
- DJGPP - how to make timeout in loop when interrupt disabled? - Japheth, 22.04.2008, 12:41
- DJGPP - how to make timeout in loop when interrupt disabled? - RayeR, 22.04.2008, 11:34
- DJGPP - how to make timeout in loop when interrupt disabled? - Japheth, 22.04.2008, 10:33