I've read about the API call CriticalSection, that
you can use to stop Windows from task switching as
follows:
'code start
! MOV AX,&H1681 'CriticalSection API call
! INT &H2F
'code ..........
'code finish:
! MOV AX,&H1682 'release the Critical Task Block
! INT &H2F
I've also read that this call can be used only for
short periods of time.
I've written an animation program that displays movies
smoothly in pure DOS mode. It uses a millisecond timer.
In a DOS window, I can detect a slight random hesitation
in the movie. I'd like to use the Critical API call to
make the movie smooth in a DOS window.
Questions:
1. How long is it safe to use this Critical API call?
That is, the maximum time between &H1681 and &H1682 ?
2. After using it for that time, how long must you
wait until you can use it again?
I'd like to make the call at program start, then release
it at program finish -- which might be an hour later.
Failing that, I'd like to call and release it repeatedly
and very rapidly.
Mark
you can use to stop Windows from task switching as
follows:
'code start
! MOV AX,&H1681 'CriticalSection API call
! INT &H2F
'code ..........
'code finish:
! MOV AX,&H1682 'release the Critical Task Block
! INT &H2F
I've also read that this call can be used only for
short periods of time.
I've written an animation program that displays movies
smoothly in pure DOS mode. It uses a millisecond timer.
In a DOS window, I can detect a slight random hesitation
in the movie. I'd like to use the Critical API call to
make the movie smooth in a DOS window.
Questions:
1. How long is it safe to use this Critical API call?
That is, the maximum time between &H1681 and &H1682 ?
2. After using it for that time, how long must you
wait until you can use it again?
I'd like to make the call at program start, then release
it at program finish -- which might be an hour later.
Failing that, I'd like to call and release it repeatedly
and very rapidly.
Mark
Comment