Add boot log
This commit is contained in:
parent
84eb9b1a72
commit
3c31f14a62
16
src/main.rs
16
src/main.rs
|
@ -27,18 +27,24 @@ fn init() {
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn _start() {
|
pub extern "C" fn _start() {
|
||||||
println!("Hello, world");
|
use crate::vga_buffer::{change_color, Color};
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
print!("[ ");
|
||||||
|
change_color(Color::Green, Color::Black);
|
||||||
|
print!("OK");
|
||||||
|
change_color(Color::White, Color::Black);
|
||||||
|
println!(" ] Initialized GDT and interrupts");
|
||||||
|
|
||||||
x86_64::instructions::interrupts::int3();
|
|
||||||
|
print!("Welcome to ");
|
||||||
|
change_color(Color::Blue, Color::Black);
|
||||||
|
println!("KarxOS!");
|
||||||
|
change_color(Color::White, Color::Black);
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
test_main();
|
test_main();
|
||||||
|
|
||||||
crate::vga_buffer::change_color(crate::vga_buffer::Color::Yellow, crate::vga_buffer::Color::Black);
|
|
||||||
println!("It did not crash!");
|
|
||||||
crate::vga_buffer::change_color(crate::vga_buffer::Color::White, crate::vga_buffer::Color::Black);
|
|
||||||
loop {
|
loop {
|
||||||
x86_64::instructions::hlt();
|
x86_64::instructions::hlt();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue