Files
blog_os/src/lib.rs
2019-01-25 14:21:12 +01:00

21 lines
351 B
Rust

#![cfg_attr(not(test), no_std)]
#![feature(abi_x86_interrupt)]
pub mod gdt;
pub mod interrupts;
pub mod serial;
pub mod vga_buffer;
pub unsafe fn exit_qemu() {
use x86_64::instructions::port::Port;
let mut port = Port::<u32>::new(0xf4);
port.write(0);
}
pub fn hlt_loop() -> ! {
loop {
x86_64::instructions::hlt();
}
}