blob: 8218691d3f46e425992d512ad2697b4e845ba00a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
//! # Kernel
//!
//! Kernel Start
#![no_std] // don't link the Rust standard library
#![no_main] // disable all Rust-level entry points
#![feature(const_mut_refs)]
mod sync;
mod vga;
use vga::*;
use core::panic::PanicInfo;
/// This function is called on panic.
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
loop {}
}
fn kernel_init() {
WRITER.init();
}
#[no_mangle]
pub extern "C" fn _start() -> ! {
kernel_init();
WRITER.write_string("Hello World!");
WRITER.write_string("\n\nHi\n");
println!("{}", 5);
//print_something();
loop {}
}
|