mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
[NTVDM:BIOS]
Properly implement INT 15h, AH = 86h. svn path=/trunk/; revision=72481
This commit is contained in:
parent
fd7db0e65b
commit
c93742a831
1 changed files with 23 additions and 6 deletions
|
@ -327,14 +327,31 @@ static VOID WINAPI BiosMiscService(LPWORD Stack)
|
||||||
* See Ralf Brown: http://www.ctyme.com/intr/rb-1525.htm
|
* See Ralf Brown: http://www.ctyme.com/intr/rb-1525.htm
|
||||||
* for more information.
|
* for more information.
|
||||||
*/
|
*/
|
||||||
LARGE_INTEGER TimeOut;
|
|
||||||
TimeOut.QuadPart = MAKELONG(getDX(), getCX()) * -10LL;
|
|
||||||
|
|
||||||
// HACK: For now, use the NT API (time in hundreds of nanoseconds).
|
static ULONG CompletionTime = 0;
|
||||||
NtDelayExecution(FALSE, &TimeOut);
|
|
||||||
|
/* Check if we're already looping */
|
||||||
|
if (getCF())
|
||||||
|
{
|
||||||
|
if (GetTickCount() >= CompletionTime)
|
||||||
|
{
|
||||||
|
/* Stop looping */
|
||||||
|
setCF(0);
|
||||||
|
|
||||||
|
/* Clear the CF on the stack too */
|
||||||
|
Stack[STACK_FLAGS] &= ~EMULATOR_FLAG_CF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Set the CF on the stack */
|
||||||
|
Stack[STACK_FLAGS] |= EMULATOR_FLAG_CF;
|
||||||
|
|
||||||
|
/* Set the completion time and start looping */
|
||||||
|
CompletionTime = GetTickCount() + (MAKELONG(getDX(), getCX()) / 1000);
|
||||||
|
setCF(1);
|
||||||
|
}
|
||||||
|
|
||||||
/* Clear CF */
|
|
||||||
Stack[STACK_FLAGS] &= ~EMULATOR_FLAG_CF;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue