summaryrefslogtreecommitdiffhomepage
path: root/Private/KernelKit/DebugOutput.hpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-10 13:26:40 +0100
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-10 13:26:40 +0100
commit94d7585ae766d777f41d07b1a98051d12a6a0256 (patch)
treebe61851ffe4e0eeb0fe539db4e14ca94519021c9 /Private/KernelKit/DebugOutput.hpp
parenta22ddb45201f40e41902b4c189c31c6418742c8a (diff)
Kernel: See below.
- WiP on debug protocol.
Diffstat (limited to 'Private/KernelKit/DebugOutput.hpp')
-rw-r--r--Private/KernelKit/DebugOutput.hpp35
1 files changed, 34 insertions, 1 deletions
diff --git a/Private/KernelKit/DebugOutput.hpp b/Private/KernelKit/DebugOutput.hpp
index b9930cb2..683c0903 100644
--- a/Private/KernelKit/DebugOutput.hpp
+++ b/Private/KernelKit/DebugOutput.hpp
@@ -7,10 +7,23 @@
#pragma once
#include <KernelKit/DeviceManager.hpp>
+#include <CompilerKit/CompilerKit.hpp>
#include <NewKit/OwnPtr.hpp>
#include <NewKit/Stream.hpp>
-#include "CompilerKit/CompilerKit.hpp"
+#define kDebugMaxPorts 16
+
+#define kDebugUnboundPort 0x0FEED
+
+#define kDebugMag0 'H'
+#define kDebugMag1 'D'
+#define kDebugMag2 'B'
+#define kDebugMag3 'G'
+
+#define kDebugSourceFile 0
+#define kDebugLine 33
+#define kDebugTeam 43
+#define kDebugEOP 49
namespace HCore {
// @brief Emulates a VT100 terminal.
@@ -35,6 +48,26 @@ inline TerminalDevice end_line() {
selfTerm << "\n";
return selfTerm;
}
+
+inline TerminalDevice carriage_return() {
+ TerminalDevice selfTerm = TerminalDevice::Shared();
+ selfTerm << "\r";
+ return selfTerm;
+}
+
+inline TerminalDevice get_buffer(Char* buf) {
+ TerminalDevice selfTerm = TerminalDevice::Shared();
+ selfTerm >> buf;
+ return selfTerm;
+}
+
+typedef Char rt_debug_type[255];
+
+class DebuggerPorts final {
+ public:
+ Int16 fPort[kDebugMaxPorts];
+ Int16 fBoundCnt;
+};
} // namespace HCore
#ifdef kcout