[patch] Bug in printing character from extended ASCII on pc386 vga console

Alexey Shamrin shamrin at gmail.com
Thu Nov 30 07:10:35 UTC 2006


Hello!

When trying to print character with code higher than 127 to vga
console on pc386, it is printed with blinking attribute enabled.

The reason: char == signed char, so such characters get represented by
negative numbers. The sign bit then goes to attribute byte, giving
blinking.

The patch can be applied to rtems/c/src/lib/libbsp/i386/pc386/console/outch.c

--- outch.c	Thu Nov 30 09:56:24 2006
+++ outch_fixed.c	Thu Nov 30 09:57:32 2006
@@ -141,7 +141,7 @@
 		return;
 	}
    	default: {
-	    *pt_bitmap = car | attribute;
+	    *pt_bitmap = (unsigned char)car | attribute;
 		advanceCursor();
 	    return;
 	}

-- 
Alexey



More information about the users mailing list