Tsk, tsk, Martin. You forgot to use the screen access functions.
Also its always good to hoist comparisons out of such small loops.
r~
--- 2.1.111/drivers/video/vgacon.c Fri Jun 18 18:20:30 1999
+++ 2.1.111-axp/drivers/video/vgacon.c Sun Jul 26 18:50:54 1998
@@ -347,13 +347,19 @@ static void vgacon_invert_region(struct
{
int col = vga_can_do_color;
- while (count--) {
- u16 a = *p;
- if (col)
- a = ((a) & 0x88ff) | (((a) & 0x7000) >> 4) | (((a) & 0x0700) << 4);
- else
+ if (col) {
+ while (count--) {
+ u16 a = scr_readw(p);
+ a = (((a) & 0x88ff) | (((a) & 0x7000) >> 4)
+ | (((a) & 0x0700) << 4));
+ scr_writew(a, p++);
+ }
+ } else {
+ while (count--) {
+ u16 a = scr_readw(p);
a ^= ((a & 0x0700) == 0x0100) ? 0x7000 : 0x7700;
- *p++ = a;
+ scr_writew(a, p++);
+ }
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html