Beispiel #1
0
void cga_init() {
    vmem_map(spc_current(), CGA_VR_PHYSICAL, (void*)CGA_VR_LOCATION, PG_WRITABLE);

    asm("cld; rep stosl;"
        :   /* no output */
        :   "D"(CGA_VR_LOCATION),
            "c"(CGA_VR_SIZE / 4),
            "a"(0x0F200F20)
        );

    /* hide the cursor */
    outb(0xA, 0x3D4);
    outb(0x20, 0x3D5);

    __cga_x = __cga_y = 0;

    log_add_writer(cga_write, "screen-log");
    log_set_level("screen-log", Info);
}
Beispiel #2
0
void serial_log_init() {
    serial_port_init(PORT_COM1);

    log_add_writer(serial_log_com1, "serial-log");
    log_set_level("serial-log", Trace);
}