mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
Add a Console device and start refactoring screen output.
This commit is contained in:
parent
d5ec18027e
commit
a70bfb87d5
5 changed files with 95 additions and 13 deletions
25
Kernel/Console.h
Normal file
25
Kernel/Console.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
#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:
|
||||
byte m_rows { 25 };
|
||||
byte m_columns { 80 };
|
||||
byte m_cursorRow { 0 };
|
||||
byte m_cursorColumn { 0 };
|
||||
|
||||
byte m_currentAttribute { 0x07 };
|
||||
|
||||
const byte* s_vgaMemory { (const byte*)0xb8000 };
|
||||
};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue