Use the SDA for storing the request in DosCallDriver.
Rename some more fields we aren't going to use to "Unused..." in the SDA.


svn path=/trunk/; revision=67651
This commit is contained in:
Aleksandar Andrejevic 2015-05-11 03:36:02 +00:00
parent c7f19ff4c0
commit 6fb47e311b
3 changed files with 6 additions and 11 deletions

View file

@ -47,23 +47,22 @@ static PDOS_REQUEST_HEADER DeviceRequest;
static VOID DosCallDriver(DWORD Driver, PDOS_REQUEST_HEADER Request)
{
PDOS_DRIVER DriverBlock = (PDOS_DRIVER)FAR_POINTER(Driver);
PDOS_REQUEST_HEADER RemoteRequest = FAR_POINTER(REQUEST_LOCATION);
WORD ES = getES();
WORD BX = getBX();
/* Set ES:BX to the location of the request */
setES(HIWORD(REQUEST_LOCATION));
setBX(LOWORD(REQUEST_LOCATION));
setES(DOS_DATA_SEGMENT);
setBX(DOS_DATA_OFFSET(Sda.Request));
/* Copy the request structure to ES:BX */
RtlMoveMemory(RemoteRequest, Request, Request->RequestLength);
RtlMoveMemory(&Sda->Request, Request, Request->RequestLength);
/* Call the strategy routine, and then the interrupt routine */
Call16(HIWORD(Driver), DriverBlock->StrategyRoutine);
Call16(HIWORD(Driver), DriverBlock->InterruptRoutine);
/* Get the request structure from ES:BX */
RtlMoveMemory(Request, RemoteRequest, Request->RequestLength);
RtlMoveMemory(Request, &Sda->Request, Request->RequestLength);
/* Restore ES:BX */
setES(ES);

View file

@ -12,7 +12,6 @@
/* DEFINITIONS ****************************************************************/
#define MAX_DEVICE_NAME 8
#define REQUEST_LOCATION 0x00700100 // 0070:0100
#define DEVICE_CODE_SIZE 10
#define DEVICE_PRIVATE_AREA(Driver) (Driver + sizeof(DOS_DRIVER) + DEVICE_CODE_SIZE)

View file

@ -178,12 +178,9 @@ typedef struct _DOS_SDA
BYTE ConsoleSwappedFlag;
BYTE Int28CallOk;
BYTE Int24AbortFlag;
DOS_RW_REQUEST ReadWriteRequest;
DOS_RW_REQUEST Request;
DWORD DriverEntryPoint;
DOS_IOCTL_RW_REQUEST IoctlRequest;
DOS_PEEK_REQUEST StatusRequest;
DWORD DeviceIoBuffer;
DWORD Unused2;
BYTE Unused2[44];
BYTE PspCopyType;
BYTE Unused3;
BYTE UserNumber[3];