Files
blog_os/src/lib.rs
2019-01-27 14:38:49 +01:00

22 lines
367 B
Rust

#![cfg_attr(not(test), no_std)]
#![feature(abi_x86_interrupt)]
pub mod gdt;
pub mod interrupts;
pub mod memory;
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();
}
}