ReactOS 0.4.16-dev-297-gc569aee
|
#include "ntvdm.h"
#include <debug.h>
#include "emulator.h"
#include <isvbop.h>
#include "utils.h"
#include "dem.h"
#include "dos/dos32krnl/device.h"
#include "dos/dos32krnl/memory.h"
#include "dos/dos32krnl/process.h"
#include "cpu/bop.h"
#include "cpu/cpu.h"
#include "bios/bios.h"
#include "mouse32.h"
#include "vddsup.h"
#include "command_com.h"
Go to the source code of this file.
Classes | |
struct | _COMSPEC_INFO |
struct | _NEXT_CMD |
struct | _DOS_START_PROC32 |
Macros | |
#define | NDEBUG |
Typedefs | |
typedef struct _COMSPEC_INFO | COMSPEC_INFO |
typedef struct _COMSPEC_INFO * | PCOMSPEC_INFO |
typedef struct _NEXT_CMD | NEXT_CMD |
typedef struct _NEXT_CMD * | PNEXT_CMD |
typedef struct _DOS_START_PROC32 | DOS_START_PROC32 |
typedef struct _DOS_START_PROC32 * | PDOS_START_PROC32 |
Functions | ||||||||||
VOID | Dem_BiosCharPrint (CHAR Character) | |||||||||
VOID | DosCharPrint (CHAR Character) | |||||||||
static VOID | DemLoadNTDOSKernel (VOID) | |||||||||
static VOID WINAPI | DosSystemBop (LPWORD Stack) | |||||||||
static PCOMSPEC_INFO | FindComSpecInfoByPsp (WORD Psp) | |||||||||
static VOID | InsertComSpecInfo (PCOMSPEC_INFO ComSpecInfo) | |||||||||
static VOID | RemoveComSpecInfo (PCOMSPEC_INFO ComSpecInfo) | |||||||||
static VOID | DosProcessConsoleAttach (VOID) | |||||||||
static VOID | DosProcessConsoleDetach (VOID) | |||||||||
static VOID | CmdStartProcess (VOID) | |||||||||
static VOID | CmdStartExternalCommand (VOID) | |||||||||
static VOID | CmdStartComSpec32 (VOID) | |||||||||
static VOID | CmdSetExitCode (VOID) | |||||||||
static VOID WINAPI | DosCmdInterpreterBop (LPWORD Stack) | |||||||||
static DWORD | DosStartComSpec (IN BOOLEAN Permanent, IN LPCSTR Environment OPTIONAL, IN DWORD ReturnAddress OPTIONAL, OUT PWORD ComSpecPsp OPTIONAL) | |||||||||
static DWORD WINAPI | CommandThreadProc (LPVOID Parameter) | |||||||||
DWORD | DosStartProcess32 (IN LPCSTR ExecutablePath, IN LPCSTR CommandLine, IN LPCSTR Environment OPTIONAL, IN DWORD ReturnAddress OPTIONAL, IN BOOLEAN StartComSpec) | |||||||||
static VOID WINAPI | DosInitialize (LPWORD Stack) | |||||||||
VOID | DosBootsectorInitialize (VOID) | |||||||||
static VOID WINAPI | DosStart (LPWORD Stack) | |||||||||
BOOLEAN | DosShutdown (BOOLEAN Immediate) | |||||||||
DWORD WINAPI | demClientErrorEx (IN HANDLE FileHandle, IN CHAR Unknown, IN BOOL Flag) | |||||||||
DWORD WINAPI | demFileDelete (IN LPCSTR FileName) | |||||||||
static BOOLEAN | dempIsFileMatch (_Inout_ PWIN32_FIND_DATAA FindData, _In_ WORD AttribMask, _Out_ PCSTR *ShortName) | |||||||||
Helper for demFileFindFirst() and demFileFindNext(). Returns TRUE if a file matches the DOS attributes and has a 8.3 file name. | ||||||||||
demFileFindFirst | ||||||||||
Implementation of the DOS INT 21h, AH=4Eh "Find First File" function. Starts enumerating files that match the given file search specification and whose attributes are at most those specified by the mask. This means in particular that "normal files", i.e. files with no attributes set, are always enumerated along those matching the requested attributes.
| ||||||||||
DWORD WINAPI | demFileFindFirst (_Out_ PVOID pFindFileData, _In_ PCSTR FileName, _In_ WORD AttribMask) | |||||||||
demFileFindNext | ||||||||||
Implementation of the DOS INT 21h, AH=4Fh "Find Next File" function. Continues enumerating files, with the same file search specification and attributes as those given to the first demFileFindFirst() call.
| ||||||||||
DWORD WINAPI | demFileFindNext (_Inout_ PVOID pFindFileData) | |||||||||
UCHAR WINAPI | demGetPhysicalDriveType (IN UCHAR DriveNumber) | |||||||||
BOOL WINAPI | demIsShortPathName (IN LPCSTR Path, IN BOOL Unknown) | |||||||||
DWORD WINAPI | demSetCurrentDirectoryGetDrive (IN LPCSTR CurrentDirectory, OUT PUCHAR DriveNumber) | |||||||||
Variables | |
static ULONG | SessionId = 0 |
static COMSPEC_INFO | RootCmd |
static DWORD | ReentrancyCount = 0 |
static LIST_ENTRY | ComSpecInfoList = { &ComSpecInfoList, &ComSpecInfoList } |
static VDM_COMMAND_INFO | CommandInfo |
static BOOLEAN | Repeat = FALSE |
static BOOLEAN | Reentry = FALSE |
static BOOLEAN | First = TRUE |
static CHAR | CmdLine [MAX_PATH] = "" |
static CHAR | AppName [MAX_PATH] = "" |
static CHAR | PifFile [MAX_PATH] = "" |
static CHAR | CurDirectory [MAX_PATH] = "" |
static CHAR | Desktop [MAX_PATH] = "" |
static CHAR | Title [MAX_PATH] = "" |
static ULONG | EnvSize = 256 |
static PVOID | Env = NULL |
static BYTE | Bootsector1 [] |
static BYTE | Bootsector2 [] |
static BYTE | Startup [] |
typedef struct _COMSPEC_INFO COMSPEC_INFO |
typedef struct _DOS_START_PROC32 DOS_START_PROC32 |
typedef struct _COMSPEC_INFO * PCOMSPEC_INFO |
typedef struct _DOS_START_PROC32 * PDOS_START_PROC32 |
Definition at line 505 of file dem.c.
Referenced by DosCmdInterpreterBop().
Definition at line 465 of file dem.c.
Referenced by DosCmdInterpreterBop().
Definition at line 411 of file dem.c.
Referenced by DosCmdInterpreterBop().
Definition at line 290 of file dem.c.
Referenced by DosCmdInterpreterBop().
Definition at line 828 of file dem.c.
Referenced by DosStartProcess32().
Definition at line 57 of file dem.c.
Definition at line 1402 of file dem.c.
Referenced by DosInt21h().
DWORD WINAPI demFileFindFirst | ( | _Out_ PVOID | pFindFileData, |
_In_ PCSTR | FileName, | ||
_In_ WORD | AttribMask | ||
) |
Definition at line 1515 of file dem.c.
Referenced by DosInt21h().
Definition at line 1592 of file dem.c.
Referenced by DosInt21h().
Definition at line 88 of file dem.c.
Referenced by DosSystemBop().
|
static |
Helper for demFileFindFirst() and demFileFindNext(). Returns TRUE if a file matches the DOS attributes and has a 8.3 file name.
Definition at line 1414 of file dem.c.
Referenced by demFileFindFirst(), and demFileFindNext().
Definition at line 1089 of file dem.c.
Referenced by BiosBootstrapLoader().
Definition at line 588 of file dem.c.
Referenced by DosInitialize().
Definition at line 1129 of file dem.c.
Referenced by DosBootsectorInitialize().
Definition at line 228 of file dem.c.
Referenced by DosStart(), and DosStartProcess32().
Definition at line 235 of file dem.c.
Referenced by DosStartProcess32().
Definition at line 1331 of file dem.c.
Referenced by VdmShutdown().
Definition at line 1197 of file dem.c.
Referenced by DosInitialize().
|
static |
Definition at line 772 of file dem.c.
Referenced by DosStart(), and DosStartProcess32().
DWORD DosStartProcess32 | ( | IN LPCSTR | ExecutablePath, |
IN LPCSTR | CommandLine, | ||
IN LPCSTR Environment | OPTIONAL, | ||
IN DWORD ReturnAddress | OPTIONAL, | ||
IN BOOLEAN | StartComSpec | ||
) |
Definition at line 916 of file dem.c.
Referenced by CmdStartComSpec32(), CmdStartExternalCommand(), and DosCreateProcess().
Definition at line 132 of file dem.c.
Referenced by DosInitialize().
|
static |
Definition at line 199 of file dem.c.
Referenced by CmdSetExitCode(), and CmdStartProcess().
|
static |
|
static |
Definition at line 220 of file dem.c.
Referenced by CmdSetExitCode(), and CmdStartProcess().
Definition at line 252 of file dem.c.
Referenced by AllocConsole(), BasepComputeProcessPath(), CmdStartProcess(), ConDllInitialize(), DosCreateProcess(), DosStart(), ExtractAndInstallThread(), FindLabelContext(), GetINIValue(), IntAllocConsole(), main(), SetUpAppName(), shell(), and test_match_ex().
|
static |
|
static |
Definition at line 251 of file dem.c.
Referenced by CmdStartComSpec32(), CmdStartExternalCommand(), CmdStartProcess(), and DosStart().
|
static |
Definition at line 246 of file dem.c.
Referenced by BaseSrvCopyCommand(), BaseSrvFillCommandInfo(), BaseSrvFreeVDMInfo(), CmdSetExitCode(), CmdStartProcess(), CommandThreadProc(), DosStart(), and DosStartProcess32().
|
static |
Definition at line 196 of file dem.c.
Referenced by DosShutdown(), FindComSpecInfoByPsp(), and InsertComSpecInfo().
Definition at line 255 of file dem.c.
Referenced by CmdStartProcess().
Definition at line 256 of file dem.c.
Referenced by CmdStartProcess().
Definition at line 259 of file dem.c.
Referenced by CmdStartProcess(), DosStart(), and test_Predefined().
|
static |
Definition at line 258 of file dem.c.
Referenced by CmdStartProcess(), DosStart(), and test_Predefined().
Definition at line 250 of file dem.c.
Referenced by CmdStartProcess().
Definition at line 254 of file dem.c.
Referenced by CmdStartProcess().
|
static |
Definition at line 193 of file dem.c.
Referenced by CommandThreadProc(), and DosShutdown().
Definition at line 248 of file dem.c.
Referenced by DosCmdInterpreterBop(), and DosStartProcess32().
Definition at line 247 of file dem.c.
Referenced by CheckPattern(), CmdSetExitCode(), CmdStartComSpec32(), CmdStartExternalCommand(), CmdStartProcess(), DosStartProcess32(), FAST486_OPCODE_HANDLER(), MakePattern(), and ProcessTest().
|
static |
Definition at line 192 of file dem.c.
Referenced by CmdSetExitCode(), DosShutdown(), DosStart(), and RemoveComSpecInfo().
|
static |
Definition at line 179 of file dem.c.
Referenced by CmdSetExitCode(), CmdStartProcess(), DosCmdInterpreterBop(), and DosStart().
|
static |
Definition at line 1121 of file dem.c.
Referenced by DosInitialize(), and CImageDx::SHARED::Init().
Definition at line 257 of file dem.c.
Referenced by CmdStartProcess().