/* Restore the device state */ void pcfb_set_state(const pcfb_bios_state * pbs) { registers regs; pcfb_set_mode(pbs->display_mode); regs.rshort.ax = 0x500; /* force display of page 0 */ int86(0x10, ®s, ®s); regs.rshort.ax = pbs->text_font; regs.h.bl = 0; int86(0x10, ®s, ®s); regs.h.ah = 0x3; regs.h.bh = 0; int86(0x10, ®s, ®s); /* Get cursor to reset MCGA */ regs.h.al = pbs->text_page; regs.h.ah = 0x5; int86(0x10, ®s, ®s); regs.rshort.cx = pbs->text_cursor_mode; regs.h.ah = 0x1; int86(0x10, ®s, ®s); regs.rshort.ax = 0x1001; regs.h.bh = pbs->border_color; int86(0x10, ®s, ®s); }
/* Restore the device state */ void pcfb_set_state(const pcfb_bios_state * pbs) { pcfb_set_mode(pbs->display_mode); }