From fa940c2075f74ee60aa997d388e7e367b1cc3c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 9 Nov 2013 16:11:52 +0000 Subject: [PATCH] [NTVDM] DOS: Implement INT 21h, AH 62h as a call to INT 21h, AH 51h. svn path=/branches/ntvdm/; revision=60899 --- subsystems/ntvdm/dos.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/subsystems/ntvdm/dos.c b/subsystems/ntvdm/dos.c index 59ec0fb0513..bd531ca0f3e 100644 --- a/subsystems/ntvdm/dos.c +++ b/subsystems/ntvdm/dos.c @@ -1598,7 +1598,7 @@ VOID DosInt21h(LPWORD Stack) break; } - /* Disk Reset */ + /* Disk Reset */ case 0x0D: { PDOS_PSP PspBlock = SEGMENT_TO_PSP(CurrentPsp); @@ -2328,9 +2328,14 @@ VOID DosInt21h(LPWORD Stack) break; } - /* Get Current Process ID (Get PSP Address) */ + /* Internal - Get Current Process ID (Get PSP Address) */ case 0x51: { + /* + * Identical to the documented AH=62h. + * See Ralf Brown: http://www.ctyme.com/intr/rb-2982.htm + * for more information. + */ setBX(CurrentPsp); break; } @@ -2391,6 +2396,24 @@ VOID DosInt21h(LPWORD Stack) break; } + /* Get Current PSP Address */ + case 0x62: + { + /* + * Identical to the undocumented AH=51h. + * See Ralf Brown: http://www.ctyme.com/intr/rb-3140.htm + * for more information. + */ + setAH(0x51); // Call the internal function. + /* + * Instead of calling ourselves really recursively as in: + * DosInt21h(Stack); + * prefer resetting the CF flag to let the BOP repeat. + */ + setCF(1); + break; + } + /* Unsupported */ default: {