summaryrefslogtreecommitdiff
path: root/kernel/src/lib.rs
diff options
context:
space:
mode:
authornatrixaeria <upezu@student.kit.edu>2019-10-25 21:16:04 +0200
committernatrixaeria <upezu@student.kit.edu>2019-10-25 21:16:04 +0200
commita107c7acfc0e4dd34e55a3e43a9f48bda9644393 (patch)
tree4a4d04dc7dad3e9683dd9eef2802686885374f6e /kernel/src/lib.rs
parent9a21c47ff84eed1001acec3b492105cdc2d9220b (diff)
Create a print function
Diffstat (limited to 'kernel/src/lib.rs')
-rw-r--r--kernel/src/lib.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/src/lib.rs b/kernel/src/lib.rs
index a27f0a7..48cb93d 100644
--- a/kernel/src/lib.rs
+++ b/kernel/src/lib.rs
@@ -1,6 +1,6 @@
+#![no_main]
#![feature(compiler_builtins_lib)]
#![no_std]
-#![no_main]
extern crate compiler_builtins;
@@ -11,11 +11,16 @@ use core::fmt::Write;
#[no_mangle]
pub extern "C" fn _start() -> ! {
-
let mut stdout = vga_text::OStream::new();
stdout.clear();
+
write!(&mut stdout, "hello world!");
+ core::iter::successors(Some(0), |n| Some(n + 1))
+ .for_each(|n|
+ write!(&mut stdout, "hello world {}!", n).unwrap()
+ );
+
loop {}
}