Author: hbelusca
Date: Sat Nov  9 16:11:52 2013
New Revision: 60899

URL: http://svn.reactos.org/svn/reactos?rev=60899&view=rev
Log:
[NTVDM]
DOS: Implement INT 21h, AH 62h as a call to INT 21h, AH 51h.

Modified:
    branches/ntvdm/subsystems/ntvdm/dos.c

Modified: branches/ntvdm/subsystems/ntvdm/dos.c
URL: 
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/dos.c?rev=60899&r1=60898&r2=60899&view=diff
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/dos.c       [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/dos.c       [iso-8859-1] Sat Nov  9 
16:11:52 2013
@@ -1598,7 +1598,7 @@
             break;
         }
 
-        /* Disk Reset  */
+        /* Disk Reset */
         case 0x0D:
         {
             PDOS_PSP PspBlock = SEGMENT_TO_PSP(CurrentPsp);
@@ -2328,9 +2328,14 @@
             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;
         }
@@ -2388,6 +2393,24 @@
                 setAX(ERROR_INVALID_FUNCTION);
             }
 
+            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;
         }
 


Reply via email to