static inline void mda_set_cursor_size(int from, int to) { if (mda_cursor_size_from==from && mda_cursor_size_to==to) return; if (from > to) { write_mda_b(MDA_CURSOR_OFF, 0x0a); /* disable cursor */ } else { write_mda_b(from, 0x0a); /* cursor start */ write_mda_b(to, 0x0b); /* cursor end */ } mda_cursor_size_from = from; mda_cursor_size_to = to; }
static inline void mda_set_cursor_size(int from, int to) { if (mda_cursor_size_from==from && mda_cursor_size_to==to) return; if (from > to) { write_mda_b(MDA_CURSOR_OFF, 0x0a); } else { write_mda_b(from, 0x0a); write_mda_b(to, 0x0b); } mda_cursor_size_from = from; mda_cursor_size_to = to; }
static void mda_initialize(void) { write_mda_b(97, 0x00); /* horizontal total */ write_mda_b(80, 0x01); /* horizontal displayed */ write_mda_b(82, 0x02); /* horizontal sync pos */ write_mda_b(15, 0x03); /* horizontal sync width */ write_mda_b(25, 0x04); /* vertical total */ write_mda_b(6, 0x05); /* vertical total adjust */ write_mda_b(25, 0x06); /* vertical displayed */ write_mda_b(25, 0x07); /* vertical sync pos */ write_mda_b(2, 0x08); /* interlace mode */ write_mda_b(13, 0x09); /* maximum scanline */ write_mda_b(12, 0x0a); /* cursor start */ write_mda_b(13, 0x0b); /* cursor end */ write_mda_w(0x0000, 0x0c); /* start address */ write_mda_w(0x0000, 0x0e); /* cursor location */ outb_p(MDA_MODE_VIDEO_EN | MDA_MODE_BLINK_EN, mda_mode_port); outb_p(0x00, mda_status_port); outb_p(0x00, mda_gfx_port); }
static void mda_initialize(void) { write_mda_b(97, 0x00); write_mda_b(80, 0x01); write_mda_b(82, 0x02); write_mda_b(15, 0x03); write_mda_b(25, 0x04); write_mda_b(6, 0x05); write_mda_b(25, 0x06); write_mda_b(25, 0x07); write_mda_b(2, 0x08); write_mda_b(13, 0x09); write_mda_b(12, 0x0a); write_mda_b(13, 0x0b); write_mda_w(0x0000, 0x0c); write_mda_w(0x0000, 0x0e); outb_p(MDA_MODE_VIDEO_EN | MDA_MODE_BLINK_EN, mda_mode_port); outb_p(0x00, mda_status_port); outb_p(0x00, mda_gfx_port); }