예제 #1
0
파일: console.c 프로젝트: xcodevn/rxv6
// output a character to the console
static void
cons_putc(int c)
{
	serial_putc(c);
	lpt_putc(c);
	cga_putc(c);
}
예제 #2
0
파일: console.c 프로젝트: macfij/macfij_jos
// output a character to the console
static void
cons_putc_color(int font_color, int bg_color, int c)
{
	const char *esc_seq_font = color_entries[font_color].esc_seq_font;
	const char *esc_seq_bg = color_entries[bg_color].esc_seq_bg;
	uint8_t attr = 0;

	if (font_color < 0 || font_color >= COLOR_MAX ||
	    bg_color < 0 || bg_color >= COLOR_MAX)
		panic("invalid color specifier\n");

// define NO_COLOR flag in order to keep grading scripts happy;
// python's regexes have problems with ansi escape sequences;
// it is easier to pass flag and disable colors for grading rather than
// discarding sequences in every grading regex;
#ifndef NO_COLOR
	output_esc_seq(esc_seq_font);
	output_esc_seq(esc_seq_bg);
#endif
	serial_putc(c);

	attr = ((bg_color & 0x7) << 4) | (font_color & 0xf);
	c |= (attr << 8);
	lpt_putc(c);
	cga_putc(c);
}
예제 #3
0
/* cons_putc - print a single character @c to console devices */
void
cons_putc(int c) {
    unsigned long intr_flag;
    local_irq_save(intr_flag);
    {
        lpt_putc(c);
        cga_putc(c);
        serial_putc(c);
    }
    local_irq_restore(intr_flag);
}
예제 #4
0
/* cons_putc - print a single character @c to console devices */
void cons_putc(int c)
{
	bool intr_flag;
	local_intr_save(intr_flag);
	{
		lpt_putc(c);
		cga_putc(c);
		serial_putc(c);
	}
	local_intr_restore(intr_flag);
}
예제 #5
0
void
cons_putc(int c)
{
    if(panicked) {
        cli();
        for(;;)
            ;
    }

    lpt_putc(c);
    cga_putc(c);
}
예제 #6
0
// output a character to the console
void
cons_putc(int c)
{
	lpt_putc(c);
	cga_putc(c);
}