diff --git a/subsystems/ntvdm/dos.c b/subsystems/ntvdm/dos.c index df81cd79db5..67a53b33985 100644 --- a/subsystems/ntvdm/dos.c +++ b/subsystems/ntvdm/dos.c @@ -964,7 +964,7 @@ BOOLEAN DosCreateProcess(LPCSTR CommandLine, WORD EnvBlock) for (i = Header->e_maxalloc; i >= Header->e_minalloc; i--, ExeSize--) { /* Try to allocate that much memory */ - Segment = DosAllocateMemory(ExeSize, NULL); + Segment = DosAllocateMemory((WORD)ExeSize, NULL); if (Segment != 0) break; } @@ -974,7 +974,7 @@ BOOLEAN DosCreateProcess(LPCSTR CommandLine, WORD EnvBlock) /* Initialize the PSP */ DosInitializePsp(Segment, CommandLine, - ExeSize, + (WORD)ExeSize, EnvBlock); /* The process owns its own memory */ @@ -1046,7 +1046,7 @@ BOOLEAN DosCreateProcess(LPCSTR CommandLine, WORD EnvBlock) /* Initialize the PSP */ DosInitializePsp(Segment, CommandLine, - (FileSize + sizeof(DOS_PSP)) >> 4, + (WORD)((FileSize + sizeof(DOS_PSP)) >> 4), EnvBlock); /* Set the initial segment registers */ @@ -1227,8 +1227,8 @@ VOID DosInt21h(LPWORD Stack) DWORD Ecx = EmulatorGetRegister(EMULATOR_REG_CX); DWORD Edx = EmulatorGetRegister(EMULATOR_REG_DX); DWORD Ebx = EmulatorGetRegister(EMULATOR_REG_BX); - WORD DataSegment = EmulatorGetRegister(EMULATOR_REG_DS); - WORD ExtSegment = EmulatorGetRegister(EMULATOR_REG_ES); + WORD DataSegment = (WORD)EmulatorGetRegister(EMULATOR_REG_DS); + WORD ExtSegment = (WORD)EmulatorGetRegister(EMULATOR_REG_ES); /* Check the value in the AH register */ switch (HIBYTE(Eax)) diff --git a/subsystems/ntvdm/vga.c b/subsystems/ntvdm/vga.c index 02f1fd727ff..c8eb211c3d6 100644 --- a/subsystems/ntvdm/vga.c +++ b/subsystems/ntvdm/vga.c @@ -235,7 +235,7 @@ static VOID VgaEnterGraphicsMode(UINT Width, UINT Height, UINT BitDepth) BitmapInfo->bmiHeader.biSizeImage = Width * Height * (BitDepth / 8); /* Fill the palette data */ - for (i = 0; i < BitDepth; i++) PaletteIndex[i] = i; + for (i = 0; i < BitDepth; i++) PaletteIndex[i] = (WORD)i; /* Fill the console graphics buffer info */ GraphicsBufferInfo.dwBitMapInfoLength = VGA_BITMAP_INFO_SIZE; @@ -503,8 +503,8 @@ static VOID VgaUpdateTextCursor(VOID) Location += (VgaCrtcRegisters[VGA_CRTC_CURSOR_END_REG] >> 5) & 3; /* Find the coordinates of the new position */ - Position.X = Location % ScanlineSize; - Position.Y = Location / ScanlineSize; + Position.X = (WORD)(Location % ScanlineSize); + Position.Y = (WORD)(Location / ScanlineSize); /* Update the physical cursor */ SetConsoleCursorInfo(TextConsoleBuffer, &CursorInfo);