Start stdin
This commit is contained in:
@@ -1,23 +1,24 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use core::time::Duration;
|
||||
|
||||
use os_std::syscall;
|
||||
os_std::custom_std_setup! {}
|
||||
|
||||
fn main() {
|
||||
let mut test = String::new();
|
||||
test.push('A');
|
||||
test.push('B');
|
||||
for _ in 0..100 {
|
||||
test.push('C');
|
||||
}
|
||||
// let mut input = String::new();
|
||||
// let mut file = syscall::open("/dev/fb0");
|
||||
// syscall::seek(&mut file, SeekFrom::End(-3));
|
||||
// syscall::write(&mut file, &[255; 6400 * 50]);
|
||||
syscall::sleep(Duration::from_secs_f64(2.0));
|
||||
let mut stdin = syscall::open("/dev/input/keyboard");
|
||||
let mut test = [0; 2];
|
||||
syscall::read(&mut stdin, &mut test);
|
||||
let mut file = syscall::open("/dev/tty0");
|
||||
syscall::write(&mut file, b"Hi !\nnice tty\x08");
|
||||
println!(
|
||||
"Hello from PIC program loaded dynamically with custom std and a better justfile, and syscalls ! {}",
|
||||
"Hello from PIC program loaded dynamically with custom std and a better justfile, and syscalls ! {:?}",
|
||||
test
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user