aboutsummaryrefslogtreecommitdiff
path: root/util/romcc/tests/simple_test29.c
blob: 7eb8f4fa75e66c0c64a4286df2bb4e690880eaab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
static void outb(unsigned char value, unsigned short port)
{
        __builtin_outb(value, port);
}

static unsigned char inb(unsigned short port)
{
        return __builtin_inb(port);
}

static void __console_tx_byte(unsigned char byte)
{
	while(inb(0x3f8 + 0x05))
		;
	outb(byte, 0x3f8 + 0x00);
}

static void __console_tx_string(int loglevel, const char *str)
{
        if (8 > loglevel) {
                unsigned char ch;
                while((ch = *str++) != '\0') {
                        __console_tx_byte(ch);
                }
        }
}
static void console_init(void)
{
        static const char console_test[] =
                "\r\n\r\nLinuxBIOS-"
                "1.1.0"
                ".0Fallback"
                " "
                "Mon Jun 9 18:15:20 MDT 2003"
                " starting...\r\n";
        __console_tx_string(6, console_test);
}