summaryrefslogtreecommitdiff
path: root/Kernel/Console.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-10-23 13:02:38 +0200
committerAndreas Kling <awesomekling@gmail.com>2018-10-23 13:02:38 +0200
commit77821da42f0503fc7cdf7c58602aef5b98558557 (patch)
tree31f958440a5bb249a3c9f74132deaeb8aa093f85 /Kernel/Console.cpp
parent63e253bac9157eb9ffa4dd1a6ca6fa6f308481d0 (diff)
downloadserenity-77821da42f0503fc7cdf7c58602aef5b98558557.zip
Also send console output to port 0xe9 (bochs console.)
This is very handy for debugging.
Diffstat (limited to 'Kernel/Console.cpp')
-rw-r--r--Kernel/Console.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Kernel/Console.cpp b/Kernel/Console.cpp
index 9ea51a8b24..86809ffe78 100644
--- a/Kernel/Console.cpp
+++ b/Kernel/Console.cpp
@@ -1,5 +1,9 @@
#include "Console.h"
#include "VGA.h"
+#include "IO.h"
+
+// Bytes output to 0xE9 end up on the Bochs console. It's very handy.
+#define CONSOLE_OUT_TO_E9
static Console* s_the;
@@ -27,6 +31,9 @@ ssize_t Console::read(byte* buffer, size_t bufferSize)
void Console::putChar(char ch)
{
+#ifdef CONSOLE_OUT_TO_E9
+ IO::out8(0xe9, ch);
+#endif
switch (ch) {
case '\n':
m_cursorColumn = 0;