Also send console output to port 0xe9 (bochs console.)

This is very handy for debugging.
This commit is contained in:
Andreas Kling 2018-10-23 13:02:38 +02:00
parent 63e253bac9
commit 77821da42f
2 changed files with 8 additions and 1 deletions

View file

@ -33,7 +33,7 @@ cpuid: mmx=true, apic=xapic, simd=sse2, sse4a=false, misaligned_sse=false, sep=t
cpuid: movbe=false, adx=false, aes=false, sha=false, xsave=false, xsaveopt=false, smep=false
cpuid: smap=false, mwait=true
print_timestamps: enabled=0
port_e9_hack: enabled=0
port_e9_hack: enabled=1
private_colormap: enabled=0
clock: sync=none, time0=local, rtc_sync=0
# no cmosimage

View file

@ -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;