Author: aandrejevic
Date: Mon Jun 24 18:15:53 2013
New Revision: 59331
URL:
http://svn.reactos.org/svn/reactos?rev=59331&view=rev
Log:
[NTVDM]
Implement several directory operations.
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?re…
==============================================================================
--- branches/ntvdm/subsystems/ntvdm/dos.c [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/ntvdm/dos.c [iso-8859-1] Mon Jun 24 18:15:53 2013
@@ -701,6 +701,67 @@
break;
}
+ /* Create Directory */
+ case 0x39:
+ {
+ String = (PCHAR)((ULONG_PTR)BaseAddress
+ + TO_LINEAR(DataSegment, LOWORD(Edx)));
+
+ if (CreateDirectoryA(String, NULL))
+ {
+ EmulatorClearFlag(EMULATOR_FLAG_CF);
+ }
+ else
+ {
+ EmulatorSetFlag(EMULATOR_FLAG_CF);
+ EmulatorSetRegister(EMULATOR_REG_AX,
+ (Eax & 0xFFFF0000) | LOWORD(GetLastError()));
+ }
+
+ break;
+ }
+
+ /* Remove Directory */
+ case 0x3A:
+ {
+ String = (PCHAR)((ULONG_PTR)BaseAddress
+ + TO_LINEAR(DataSegment, LOWORD(Edx)));
+
+ if (RemoveDirectoryA(String))
+ {
+ EmulatorClearFlag(EMULATOR_FLAG_CF);
+ }
+ else
+ {
+ EmulatorSetFlag(EMULATOR_FLAG_CF);
+ EmulatorSetRegister(EMULATOR_REG_AX,
+ (Eax & 0xFFFF0000) | LOWORD(GetLastError()));
+ }
+
+
+ break;
+ }
+
+ /* Set Current Directory */
+ case 0x3B:
+ {
+ String = (PCHAR)((ULONG_PTR)BaseAddress
+ + TO_LINEAR(DataSegment, LOWORD(Edx)));
+
+ if (SetCurrentDirectoryA(String))
+ {
+ EmulatorClearFlag(EMULATOR_FLAG_CF);
+ }
+ else
+ {
+ EmulatorSetFlag(EMULATOR_FLAG_CF);
+ EmulatorSetRegister(EMULATOR_REG_AX,
+ (Eax & 0xFFFF0000) | LOWORD(GetLastError()));
+ }
+
+ break;
+ }
+
/* Allocate Memory */
case 0x48:
{