mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
27 lines
578 B
C++
27 lines
578 B
C++
#pragma once
|
|
|
|
#include <VirtualFileSystem/CharacterDevice.h>
|
|
|
|
class Console final : public CharacterDevice {
|
|
public:
|
|
static Console& the();
|
|
|
|
Console();
|
|
virtual ~Console() override;
|
|
|
|
virtual ssize_t read(byte* buffer, size_t size) override;
|
|
virtual ssize_t write(const byte* data, size_t size) override;
|
|
|
|
private:
|
|
void putChar(char);
|
|
|
|
const byte m_rows { 25 };
|
|
const byte m_columns { 80 };
|
|
byte m_cursorRow { 0 };
|
|
byte m_cursorColumn { 0 };
|
|
|
|
byte m_currentAttribute { 0x07 };
|
|
|
|
const byte* s_vgaMemory { (const byte*)0xb8000 };
|
|
};
|
|
|