Ejemplo n.º 1
0
/*
 * Write a string of characters to the screen at current cursor
 * position using current attribute.
 */
void Put_String(const char *s) {
    bool iflag = Begin_Int_Atomic();
    while (*s != '\0')
        Put_Char_Imp(*s++);
    Update_Cursor();
    End_Int_Atomic(iflag);
}
Ejemplo n.º 2
0
/*
 * Write a single character to the screen at current position
 * using current attribute, handling scrolling, special characters, etc.
 */
void Put_Char(int c)
{
    bool iflag = Begin_Int_Atomic();
    Put_Char_Imp(c);
    Update_Cursor();
    End_Int_Atomic(iflag);
}
Ejemplo n.º 3
0
Archivo: start.c Proyecto: caisan/mytos
void cinit()
{
	ticks=0;
	position=800;
	startposition=0;
	mouse_x=0;
	mouse_y=0;
	mouse_state=0;
	NR_user=0;
	NR_task=0;
	Disp_Machine_Info();
//	Init_Paging();
	Init_Mem();
	disp_str("Initializing Memory........\n");
	Init_IRQ();	
	disp_str("Enable IRQ........\n");
	Init_Prot();
	disp_str("Enable protection........\n");
	Init_Mouse();
	Init_Keyboard();
	disp_str("Enable Keyboard........\n");
	Init_Process();
	disp_str("Initializing Process........\n");
	Init_Clock();
	disp_str("Enable PIT........\n");
	Init_x87_FPU();
	Update_Cursor(position);
	Init_VM8086();
//	Init_Ne2k();

}
Ejemplo n.º 4
0
/*
 * Write a buffer of characters at current cursor position
 * using current attribute.
 */
void Put_Buf(const char *buf, ulong_t length) {
    bool iflag = Begin_Int_Atomic();
    while (length > 0) {
        Put_Char_Imp(*buf++);
        --length;
    }
    Update_Cursor();
    End_Int_Atomic(iflag);
}
Ejemplo n.º 5
0
/*
 * Set the current cursor position.
 * Return true if successful, or false if the specified
 * cursor position is invalid.
 */
bool Put_Cursor(int row, int col) {
    bool iflag;

    if(row < 0 || row >= NUMROWS || col < 0 || col >= NUMCOLS)
        return false;

    iflag = Begin_Int_Atomic();
    s_cons.row = row;
    s_cons.col = col;
    Update_Cursor();
    End_Int_Atomic(iflag);

    return true;
}
Ejemplo n.º 6
0
static void Print_Finish(struct Output_Sink *o) { Update_Cursor(); }