diff options
Diffstat (limited to 'src/kernel/io/io.c')
-rw-r--r-- | src/kernel/io/io.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/kernel/io/io.c b/src/kernel/io/io.c index 7cb364c..30dcee2 100644 --- a/src/kernel/io/io.c +++ b/src/kernel/io/io.c @@ -1,5 +1,6 @@ #include <stdint.h> #include "../lib/lib.h" +#include "io.h" uint8_t receive_b(uint16_t port) { unsigned char value; @@ -39,6 +40,7 @@ void init_serial() { send_b(0x3f8 + 3, 0x03); send_b(0x3f8 + 2, 0xC7); send_b(0x3f8 + 4, 0x0B); + write_serial("Installed serial connection!"); } int is_transmit_empty() { @@ -50,4 +52,9 @@ void write_serial(char *data) { while (is_transmit_empty() == 0); send_b(0x3f8, data[i]); } + char *linebreak = "\n"; + for (size_t i = 0; i < strlen(linebreak); i++) { + while (is_transmit_empty() == 0); + send_b(0x3f8, linebreak[i]); + } } |