Пример #1
0
/*
 * TuiPrintf()
 * Prints formatted text to the screen
 */
int TuiPrintf(const char *Format, ...)
{
	int i;
	int Length;
	va_list ap;
	CHAR Buffer[512];

	va_start(ap, Format);
	Length = _vsnprintf(Buffer, sizeof(Buffer), Format, ap);
	va_end(ap);

	if (Length == -1) Length = sizeof(Buffer);

	for (i = 0; i < Length; i++)
	{
		MachConsPutChar(Buffer[i]);
	}

	return Length;
}
Пример #2
0
VOID DebugPrintChar(UCHAR Character)
{
    if (Character == '\n')
        DebugStartOfLine = TRUE;

    if (DebugPort & RS232)
    {
        if (Character == '\n')
            Rs232PortPutByte('\r');

        Rs232PortPutByte(Character);
    }
    if (DebugPort & BOCHS)
    {
        WRITE_PORT_UCHAR((PUCHAR)BOCHS_OUTPUT_PORT, Character);
    }
    if (DebugPort & SCREEN)
    {
        MachConsPutChar(Character);
    }
}