Enable bochs terminal output.
This commit is contained in:
parent
5a20c23569
commit
0dfa6008ec
3 changed files with 8 additions and 3 deletions
|
|
@ -5,14 +5,18 @@
|
|||
|
||||
#define COM1 0x3f8
|
||||
|
||||
#define BOCHS_DBG 1
|
||||
|
||||
namespace {
|
||||
bool is_transmit_empty() { return (inb(COM1 + 5) & 0x20) != 0; }
|
||||
|
||||
void dbgputchar(char c) {
|
||||
while (!is_transmit_empty())
|
||||
;
|
||||
while (!is_transmit_empty());
|
||||
|
||||
outb(COM1, c);
|
||||
#if BOCHS_DBG
|
||||
outb(0xe9, c);
|
||||
#endif
|
||||
}
|
||||
|
||||
void dbg(const glcr::StringView& str) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue