implemented stdin methods for reading a string (async) and reading keystrokes (sync + async). added a very basic shell on top of it for debugging
This commit is contained in:
+3
-23
@@ -5,10 +5,11 @@ extern crate alloc;
|
||||
|
||||
use libk::{
|
||||
drivers::{
|
||||
io::{self, keyboard},
|
||||
io,
|
||||
scheduling::task::{Executor, Task},
|
||||
},
|
||||
prelude::*,
|
||||
util::shell::shell,
|
||||
};
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
@@ -26,28 +27,7 @@ extern "C" fn kmain() -> ! {
|
||||
println!("Dimensions: {}x{} (px)", dimensions2.0, dimensions2.1);
|
||||
println!("Dimensions: {}x{} (chars)", dimensions.0, dimensions.1);
|
||||
|
||||
println!(
|
||||
"
|
||||
$$$$$$$$\\ $$\\
|
||||
$$ _____| $$ |
|
||||
$$ | $$$$$$\\ $$\\ $$\\ $$$$$$$\\ $$$$$$$ | $$$$$$\\ $$\\ $$\\
|
||||
$$$$$\\ $$ __$$\\ $$ | $$ |$$ __$$\\ $$ __$$ |$$ __$$\\ $$ | $$ |
|
||||
$$ __|$$ / $$ |$$ | $$ |$$ | $$ |$$ / $$ |$$ | \\__|$$ | $$ |
|
||||
$$ | $$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ | $$ |
|
||||
$$ | \\$$$$$$ |\\$$$$$$ |$$ | $$ |\\$$$$$$$ |$$ | \\$$$$$$$ |
|
||||
\\__| \\______/ \\______/ \\__| \\__| \\_______|\\__| \\____$$ |
|
||||
$$$$$$\\ $$$$$$\\ $$\\ $$\\ $$\\ $$\\ $$ |
|
||||
$$ __$$\\ $$ __$$\\ $$ | $$ |$$$$ | \\$$$$$$ |
|
||||
$$ / $$ |$$ / \\__| $$ | $$ |\\_$$ | \\______/
|
||||
$$ | $$ |\\$$$$$$\\ \\$$\\ $$ | $$ |
|
||||
$$ | $$ | \\____$$\\ \\$$\\$$ / $$ |
|
||||
$$ | $$ |$$\\ $$ | \\$$$ / $$ |
|
||||
$$$$$$ |\\$$$$$$ | \\$ / $$$$$$\\
|
||||
\\______/ \\______/ \\_/ \\______|
|
||||
"
|
||||
);
|
||||
|
||||
let mut executor = Executor::new();
|
||||
executor.spawn(Task::new(keyboard::print_keypresses()));
|
||||
executor.spawn(Task::new(shell()));
|
||||
executor.run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user