-unsigned char vga_read(unsigned char idx)
-{
- outb(CRTC_IDX_REG, idx);
- return inb(CRTC_DATA_REG);
-}
-
-char * vga_base()
-{
- return (char *) (
- TEXT_CONSOLE_BASE
- | (((unsigned int) vga_read(CRTC_START_ADDR_LSB_IDX)) << 9)
- | (((unsigned int) vga_read(CRTC_START_ADDR_MSB_IDX)) << 1)
- );
-}
-
-void strblit(char *src, int row, int col)
-{
- char *destp = vga_base() + row * 80 * 2 + col * 2;
- smram_state_t old_state = smram_save_state();
-
- smram_aseg_set_state(SMRAM_ASEG_SMMCODE);
-
- while (*src)
- {
- *(destp++) = *(src++);
- *(destp++) = COLOR;
- }
-
- smram_restore_state(old_state);
-}
-
-void outlog()
-{
- int y, x;
- char *basep = vga_base();