+2008-08-03 Robert Millan <rmh@aybabtu.com>
+
+ * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
+ (grub_console_setcursor): Make it possible to set cursor off.
+
2008-08-03 Robert Millan <rmh@aybabtu.com>
* util/grub.d/00_header.in: Be platform-agnostic. Probe for existence
#define CRTC_CURSOR_ADDR_HIGH 0x0e
#define CRTC_CURSOR_ADDR_LOW 0x0f
+#define CRTC_CURSOR_DISABLE (1 << 5)
+
static void
screen_write_char (int x, int y, short c)
{
grub_uint8_t old;
grub_outb (CRTC_CURSOR, CRTC_ADDR_PORT);
old = grub_inb (CRTC_DATA_PORT);
- grub_outb ((old & ~(on << 5)), CRTC_DATA_PORT);
+ if (on)
+ grub_outb (old & ~CRTC_CURSOR_DISABLE, CRTC_DATA_PORT);
+ else
+ grub_outb (old | CRTC_CURSOR_DISABLE, CRTC_DATA_PORT);
}