summaryrefslogtreecommitdiff
path: root/Kernel/Devices/DebugLogDevice.cpp
blob: 321cd97d35aca3635a95478416b22c896b3105de (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
#include <Kernel/Devices/DebugLogDevice.h>
#include <Kernel/IO.h>

static DebugLogDevice* s_the;

DebugLogDevice& DebugLogDevice::the()
{
    ASSERT(s_the);
    return *s_the;
}

DebugLogDevice::DebugLogDevice()
    : CharacterDevice(1, 18)
{
    s_the = this;
}

DebugLogDevice::~DebugLogDevice()
{
}

ssize_t DebugLogDevice::write(Process&, const byte* data, ssize_t data_size)
{
    for (int i = 0; i < data_size; ++i)
        IO::out8(0xe9, data[i]);
    return data_size;
}