mirror of
https://github.com/reactos/reactos.git
synced 2024-08-27 13:48:42 +00:00
[NTVDM]
Implement INT 21h, AH = 34h (Get Address of InDOS Flag). svn path=/trunk/; revision=67362
This commit is contained in:
parent
91dfded93d
commit
a8bc4cd508
|
@ -31,6 +31,8 @@
|
||||||
|
|
||||||
/* PRIVATE VARIABLES **********************************************************/
|
/* PRIVATE VARIABLES **********************************************************/
|
||||||
|
|
||||||
|
#define INDOS_POINTER MAKELONG(0x00FE, 0x0070)
|
||||||
|
|
||||||
CALLBACK16 DosContext;
|
CALLBACK16 DosContext;
|
||||||
|
|
||||||
static DWORD DiskTransferArea;
|
static DWORD DiskTransferArea;
|
||||||
|
@ -39,6 +41,7 @@ static CHAR LastDrive = 'E';
|
||||||
static CHAR CurrentDirectories[NUM_DRIVES][DOS_DIR_LENGTH];
|
static CHAR CurrentDirectories[NUM_DRIVES][DOS_DIR_LENGTH];
|
||||||
static DOS_SFT_ENTRY DosSystemFileTable[DOS_SFT_SIZE];
|
static DOS_SFT_ENTRY DosSystemFileTable[DOS_SFT_SIZE];
|
||||||
static WORD DosErrorLevel = 0x0000;
|
static WORD DosErrorLevel = 0x0000;
|
||||||
|
static PBYTE InDos;
|
||||||
|
|
||||||
/* PUBLIC VARIABLES ***********************************************************/
|
/* PUBLIC VARIABLES ***********************************************************/
|
||||||
|
|
||||||
|
@ -1369,6 +1372,8 @@ VOID WINAPI DosInt21h(LPWORD Stack)
|
||||||
PDOS_COUNTRY_CODE_BUFFER CountryCodeBuffer;
|
PDOS_COUNTRY_CODE_BUFFER CountryCodeBuffer;
|
||||||
INT Return;
|
INT Return;
|
||||||
|
|
||||||
|
(*InDos)++;
|
||||||
|
|
||||||
/* Check the value in the AH register */
|
/* Check the value in the AH register */
|
||||||
switch (getAH())
|
switch (getAH())
|
||||||
{
|
{
|
||||||
|
@ -1546,7 +1551,12 @@ VOID WINAPI DosInt21h(LPWORD Stack)
|
||||||
DosPrintCharacter(DOS_OUTPUT_HANDLE, '^');
|
DosPrintCharacter(DOS_OUTPUT_HANDLE, '^');
|
||||||
DosPrintCharacter(DOS_OUTPUT_HANDLE, 'C');
|
DosPrintCharacter(DOS_OUTPUT_HANDLE, 'C');
|
||||||
|
|
||||||
if (DosControlBreak()) return;
|
if (DosControlBreak())
|
||||||
|
{
|
||||||
|
/* Set the character to a newline to exit the loop */
|
||||||
|
Character = '\r';
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1873,6 +1883,15 @@ VOID WINAPI DosInt21h(LPWORD Stack)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Get Address of InDOS flag */
|
||||||
|
case 0x34:
|
||||||
|
{
|
||||||
|
setES(HIWORD(INDOS_POINTER));
|
||||||
|
setBX(LOWORD(INDOS_POINTER));
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* Get Interrupt Vector */
|
/* Get Interrupt Vector */
|
||||||
case 0x35:
|
case 0x35:
|
||||||
{
|
{
|
||||||
|
@ -2895,6 +2914,8 @@ VOID WINAPI DosInt21h(LPWORD Stack)
|
||||||
Stack[STACK_FLAGS] |= EMULATOR_FLAG_CF;
|
Stack[STACK_FLAGS] |= EMULATOR_FLAG_CF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(*InDos)--;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID WINAPI DosBreakInterrupt(LPWORD Stack)
|
VOID WINAPI DosBreakInterrupt(LPWORD Stack)
|
||||||
|
@ -2985,6 +3006,10 @@ BOOLEAN DosKRNLInitialize(VOID)
|
||||||
FILE *Stream;
|
FILE *Stream;
|
||||||
WCHAR Buffer[256];
|
WCHAR Buffer[256];
|
||||||
|
|
||||||
|
/* Setup the InDOS flag */
|
||||||
|
InDos = (PBYTE)FAR_POINTER(INDOS_POINTER);
|
||||||
|
*InDos = 0;
|
||||||
|
|
||||||
/* Clear the current directory buffer */
|
/* Clear the current directory buffer */
|
||||||
RtlZeroMemory(CurrentDirectories, sizeof(CurrentDirectories));
|
RtlZeroMemory(CurrentDirectories, sizeof(CurrentDirectories));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue