From 1608c84d724612383d765cf1d5a4bab8714f150b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 25 Jan 2014 22:29:54 +0000 Subject: [PATCH] [NTVDM]: Implement a basic BIOS Wait interrupt INT 15h, AH=86h. svn path=/branches/ntvdm/; revision=61821 --- subsystems/ntvdm/bios/bios.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/subsystems/ntvdm/bios/bios.c b/subsystems/ntvdm/bios/bios.c index cad2c6c19f7..8eca3d8228a 100644 --- a/subsystems/ntvdm/bios/bios.c +++ b/subsystems/ntvdm/bios/bios.c @@ -49,6 +49,22 @@ static VOID WINAPI BiosMiscService(LPWORD Stack) { switch (getAH()) { + /* Wait */ + case 0x86: + { + /* + * Interval in microseconds CX:DX + * See Ralf Brown: http://www.ctyme.com/intr/rb-1525.htm + * for more information. + */ + Sleep(MAKELONG(getDX(), getCX())); + + /* Clear CF */ + Stack[STACK_FLAGS] &= ~EMULATOR_FLAG_CF; + + break; + } + /* Copy Extended Memory */ case 0x87: {