- Add few remaining members to the SYSVARS list.
- Implement retrieving the (DOS) boot drive (by using the host boot drive letter from %SYSTEMDRIVE%).
Should fix Win3.11 and MSD 2.0+ boot drive retrieval.
svn path=/trunk/; revision=68377
- /* Write string to STDOUT */
+ /* Write String to STDOUT */
case 0x09:
{
String = (PCHAR)SEG_OFF_TO_PTR(getDS(), getDX());
case 0x09:
{
String = (PCHAR)SEG_OFF_TO_PTR(getDS(), getDX());
/* Extended functionalities */
case 0x33:
{
/* Extended functionalities */
case 0x33:
{
+ /*
+ * DOS 4+ - GET BOOT DRIVE
+ */
+ case 0x05:
+ {
+ setDL(SysVars->BootDrive);
+ break;
+ }
+
/*
* DOS 5+ - GET TRUE VERSION NUMBER
* This function always returns the true version number, unlike
/*
* DOS 5+ - GET TRUE VERSION NUMBER
* This function always returns the true version number, unlike
* See Ralf Brown: http://www.ctyme.com/intr/rb-2730.htm
* for more information.
*/
* See Ralf Brown: http://www.ctyme.com/intr/rb-2730.htm
* for more information.
*/
+ case 0x06:
+ {
+ /*
+ * Return the true DOS version: Minor:Major in BH:BL
+ * The Windows NT DOS box returns BX=3205h (version 5.50).
+ */
+ setBX(NTDOS_VERSION);
- /*
- * Return the true DOS version: Minor:Major in BH:BL
- * The Windows NT DOS box returns BX=3205h (version 5.50).
- */
- setBX(NTDOS_VERSION);
+ /* DOS revision 0 */
+ setDL(0x00);
- /* DOS revision 0 */
- setDL(0x00);
+ /* Unpatched DOS */
+ setDH(0x00);
- /* Unpatched DOS */
- setDH(0x00);
+ break;
+ }
+
+ default:
+ {
+ DPRINT1("INT 21h, AH = 33h, subfunction AL = %Xh NOT IMPLEMENTED\n",
+ getAL());
+ }
- // else
- // {
- // /* Invalid subfunction */
- // setAL(0xFF);
- // }
/* SWITCH character - AVAILDEV */
case 0x37:
{
/* SWITCH character - AVAILDEV */
case 0x37:
{
{
/*
* DOS 2+ - "SWITCHAR" - GET SWITCH CHARACTER
{
/*
* DOS 2+ - "SWITCHAR" - GET SWITCH CHARACTER
* See Ralf Brown: http://www.ctyme.com/intr/rb-2752.htm
* for more information.
*/
* See Ralf Brown: http://www.ctyme.com/intr/rb-2752.htm
* for more information.
*/
- setDL('/');
- setAL(0x00);
- }
- else if (getAL() == 0x01)
- {
+ case 0x00:
+ setDL('/');
+ setAL(0x00);
+ break;
+
/*
* DOS 2+ - "SWITCHAR" - SET SWITCH CHARACTER
* This setting is ignored by MS-DOS 5+.
* See Ralf Brown: http://www.ctyme.com/intr/rb-2753.htm
* for more information.
*/
/*
* DOS 2+ - "SWITCHAR" - SET SWITCH CHARACTER
* This setting is ignored by MS-DOS 5+.
* See Ralf Brown: http://www.ctyme.com/intr/rb-2753.htm
* for more information.
*/
- // getDL();
- setAL(0xFF);
- }
- else if (getAL() == 0x02)
- {
+ case 0x01:
+ // getDL();
+ setAL(0xFF);
+ break;
+
/*
* DOS 2.x and 3.3+ only - "AVAILDEV" - SPECIFY \DEV\ PREFIX USE
* See Ralf Brown: http://www.ctyme.com/intr/rb-2754.htm
* for more information.
*/
/*
* DOS 2.x and 3.3+ only - "AVAILDEV" - SPECIFY \DEV\ PREFIX USE
* See Ralf Brown: http://www.ctyme.com/intr/rb-2754.htm
* for more information.
*/
- // setDL();
- setAL(0xFF);
- }
- else if (getAL() == 0x03)
- {
+ case 0x02:
+ // setDL();
+ setAL(0xFF);
+ break;
+
/*
* DOS 2.x and 3.3+ only - "AVAILDEV" - SPECIFY \DEV\ PREFIX USE
* See Ralf Brown: http://www.ctyme.com/intr/rb-2754.htm
* for more information.
*/
/*
* DOS 2.x and 3.3+ only - "AVAILDEV" - SPECIFY \DEV\ PREFIX USE
* See Ralf Brown: http://www.ctyme.com/intr/rb-2754.htm
* for more information.
*/
- // getDL();
- setAL(0xFF);
- }
- else
- {
+ case 0x03:
+ // getDL();
+ setAL(0xFF);
+ break;
+
/* Invalid subfunction */
/* Invalid subfunction */
+ default:
+ setAL(0xFF);
+ break;
- /* Terminate With Return Code */
+ /* Terminate with Return Code */
case 0x4C:
{
DosTerminateProcess(Sda->CurrentPsp, getAL(), 0);
case 0x4C:
{
DosTerminateProcess(Sda->CurrentPsp, getAL(), 0);
/* The last drive can be redefined with the LASTDRIVE command. At the moment, set the real maximum possible, 'Z'. */
SysVars->NumLocalDrives = 'Z' - 'A' + 1;
/* The last drive can be redefined with the LASTDRIVE command. At the moment, set the real maximum possible, 'Z'. */
SysVars->NumLocalDrives = 'Z' - 'A' + 1;
+ /* The boot drive is initialized to the %SYSTEMDRIVE% value */
+ // NOTE: Using the NtSystemRoot system variable might be OS-specific...
+ SysVars->BootDrive = SharedUserData->NtSystemRoot[0] - 'A' + 1;
+
/* Initialize the NUL device driver */
SysVars->NullDevice.Link = 0xFFFFFFFF;
SysVars->NullDevice.DeviceAttributes = DOS_DEVATTR_NUL | DOS_DEVATTR_CHARACTER;
/* Initialize the NUL device driver */
SysVars->NullDevice.Link = 0xFFFFFFFF;
SysVars->NullDevice.DeviceAttributes = DOS_DEVATTR_NUL | DOS_DEVATTR_CHARACTER;
BYTE NumLocalDrives; // Set by LASTDRIVE
DOS_DRIVER NullDevice;
BYTE NullDriverRoutine[7];
BYTE NumLocalDrives; // Set by LASTDRIVE
DOS_DRIVER NullDevice;
BYTE NullDriverRoutine[7];
+ BYTE Reserved2[8];
+ BYTE BootDrive;
+ BYTE UseDwordMoves;
+ WORD ExtMemSize;
} DOS_SYSVARS, *PDOS_SYSVARS;
typedef struct _DOS_CLOCK_TRANSFER_RECORD
} DOS_SYSVARS, *PDOS_SYSVARS;
typedef struct _DOS_CLOCK_TRANSFER_RECORD