Nothing to see here, move along
at main 15 lines 296 B view raw
1#[derive(Debug, Clone, Copy)] 2#[repr(u32)] 3pub enum ExitCode { 4 Success = 0x10, 5 Failure = 0x11, 6} 7 8pub fn exit(code: ExitCode) -> ! { 9 unsafe { 10 x86_64::instructions::port::Port::<u32>::new(0x501).write(code as u32); 11 } 12 loop { 13 x86_64::instructions::hlt(); 14 } 15}