diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-05-09 19:23:04 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-05-09 19:23:04 +0200 |
| commit | 915c14eb3b717bbd168d069e296a4246c6aef117 (patch) | |
| tree | b01b1e9a522b66bc070fb0e5b34efc70f172cc92 /Kernel/KernelKit/DebugOutput.hpp | |
| parent | af8a516fc22865abd80d6e26f1541fa3d6bebfdc (diff) | |
MHR-23: Starting to implement SMP for AMD64.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Kernel/KernelKit/DebugOutput.hpp')
| -rw-r--r-- | Kernel/KernelKit/DebugOutput.hpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/Kernel/KernelKit/DebugOutput.hpp b/Kernel/KernelKit/DebugOutput.hpp index 7fde69aa..656fe7a9 100644 --- a/Kernel/KernelKit/DebugOutput.hpp +++ b/Kernel/KernelKit/DebugOutput.hpp @@ -15,7 +15,7 @@ #define kDebugUnboundPort 0x0FEED -#define kDebugMag0 'H' +#define kDebugMag0 'N' #define kDebugMag1 'D' #define kDebugMag2 'B' #define kDebugMag3 'G' @@ -27,6 +27,12 @@ namespace NewOS { + class TerminalDevice; + + inline TerminalDevice& end_line(); + inline TerminalDevice& number(const Long& x); + inline TerminalDevice& hex_number(const Long& x); + // @brief Emulates a VT100 terminal. class TerminalDevice final : public DeviceInterface<const Char*> { @@ -34,10 +40,30 @@ namespace NewOS TerminalDevice(void (*print)(const Char*), void (*get)(const Char*)) : DeviceInterface<const Char*>(print, get) { + } virtual ~TerminalDevice() { + + } + + TerminalDevice& Number(const Long Data) noexcept + { + number(Data); + return *this; + } + + TerminalDevice& HexNumber(const Long Data) noexcept + { + number(Data); + return *this; + } + + TerminalDevice& EndLine() noexcept + { + end_line(); + return *this; } /// @brief returns device name (terminal name) |
