X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=drivers%2Fbase%2Fbootvid%2Fi386%2Fvga.c;h=eeb06fe8df5d6c8b2530ebf507f66edeef7f91f7;hp=e11aae77fabef8210e83b0ba8c957e457075b361;hb=b6edb50eb1a2311af040aadeec7791efa270a72e;hpb=76085ba9824b9b4ac80dc6af201e47ce88df585c diff --git a/drivers/base/bootvid/i386/vga.c b/drivers/base/bootvid/i386/vga.c index e11aae77fab..eeb06fe8df5 100644 --- a/drivers/base/bootvid/i386/vga.c +++ b/drivers/base/bootvid/i386/vga.c @@ -319,8 +319,8 @@ VgaScroll(ULONG Scroll) do { /* Write value in the new position so that we can do the scroll */ - WRITE_REGISTER_UCHAR((PUCHAR)j, - READ_REGISTER_UCHAR((PUCHAR)j + i)); + WRITE_REGISTER_UCHAR(UlongToPtr(j), + READ_REGISTER_UCHAR(UlongToPtr(j + i))); /* Move to the next memory location to write to */ j++; @@ -1197,7 +1197,7 @@ VidSolidColorFill(IN ULONG Left, __outpw(0x3CE, 7); /* Calculate pixel position for the read */ - Offset = VgaBase + (Top * 80) + (PUCHAR)LeftOffset; + Offset = VgaBase + (Top * 80) + (PUCHAR)(ULONG_PTR)LeftOffset; /* Select the bitmask register and write the mask */ __outpw(0x3CE, (USHORT)lMask); @@ -1221,7 +1221,7 @@ VidSolidColorFill(IN ULONG Left, if (Distance) { /* Calculate new pixel position */ - Offset = VgaBase + (Top * 80) + (PUCHAR)RightOffset; + Offset = VgaBase + (Top * 80) + (PUCHAR)(ULONG_PTR)RightOffset; Distance--; /* Select the bitmask register and write the mask */ @@ -1247,7 +1247,7 @@ VidSolidColorFill(IN ULONG Left, if (Distance) { /* Calculate new pixel position */ - Offset = VgaBase + (Top * 80) + (PUCHAR)(LeftOffset + 1); + Offset = VgaBase + (Top * 80) + (PUCHAR)(ULONG_PTR)(LeftOffset + 1); /* Set the bitmask to 0xFF for all 4 planes */ __outpw(0x3CE, 0xFF08);