Start stdin

This commit is contained in:
2026-03-13 11:15:52 +01:00
parent f67718c3fe
commit de6ef959ce
18 changed files with 347 additions and 72 deletions

View File

@@ -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
);
}