aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorTianhao Wang <shrik3@mailbox.org>2024-06-06 00:02:53 +0200
committerTianhao Wang <shrik3@mailbox.org>2024-06-11 15:17:14 +0200
commita86f59b32eb86a1ccb94bf1e627c1115c3b6b217 (patch)
treea3b1c10ad4fa76be79aed1f7e8eebbd2cfa146aa /src/lib.rs
parentca8bc76fd5319842954508484542f4beb6b591d0 (diff)
io: add serial output through port 0x3f8 (qemu)
not yet wrapped with fmt macros because I want some thing stateless. (i.e. I don't want to pass `&mut self` to write_str...).
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 99478be..185014d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -9,7 +9,6 @@ mod ds;
mod io;
mod machine;
mod mm;
-use crate::machine::key::Modifiers;
mod proc;
extern crate alloc;
use alloc::vec::Vec;
@@ -19,7 +18,9 @@ use arch::x86_64::interrupt::pic_8259::PicDeviceInt;
use core::panic::PanicInfo;
use defs::*;
use machine::cgascr::CGAScreen;
+use machine::key::Modifiers;
use machine::multiboot;
+use machine::serial::Serial;
#[cfg(not(test))]
#[panic_handler]
@@ -61,6 +62,7 @@ pub extern "C" fn _entry() -> ! {
for s in test_vec.iter() {
println!("{s}");
}
+ Serial::print("hello from serial");
loop {
io::KBCTL_GLOBAL.lock().fetch_key();
if let Some(k) = io::KBCTL_GLOBAL.lock().consume_key() {