static char logents[LOGLEN][41] = {{0}};
static int prodptr = 0;
+static int flush_imm = 0;
#define VRAM_BASE 0xA0000UL
#define TEXT_CONSOLE_OFFSET 0x18000UL
#define COLOR 0x1F
+void vga_flush_imm(int imm)
+{
+ flush_imm = imm;
+}
+
static unsigned char vga_read(unsigned char idx)
{
outb(CRTC_IDX_REG, idx);
{
strcpy(logents[prodptr], s);
prodptr = (prodptr + 1) % LOGLEN;
+ if (flush_imm)
+ outlog();
}
void (*output)(const char *s) = dolog;
vsnprintf(logents[prodptr], 40, fmt, va);
va_end(va);
prodptr = (prodptr + 1) % LOGLEN;
+ if (flush_imm)
+ outlog();
}
void (*outputf)(const char *s, ...) = dologf;