diff --git a/src/interrupts.rs b/src/interrupts.rs index 95d9565..e82c3b4 100644 --- a/src/interrupts.rs +++ b/src/interrupts.rs @@ -244,7 +244,11 @@ extern "C" fn syscall_handler() { match regs.rax { 0 => { let rval = if let Some(chr) = char::from_u32(regs.rcx.wrapping_cast()) { - print!("{}", chr); + if chr == '\n' { + print!("\r\n"); + } else { + print!("{}", chr); + } 0 } else { 1 diff --git a/src/serial.rs b/src/serial.rs index 1c96ffe..95a8308 100644 --- a/src/serial.rs +++ b/src/serial.rs @@ -50,10 +50,10 @@ macro_rules! print { #[macro_export] macro_rules! println { - () => ($crate::print!("\n")); + () => ($crate::print!("\r\n")); ($($arg:tt)*) => ({ $crate::serial::_print(format_args!($($arg)*)); - $crate::print!("\n"); + $crate::print!("\r\n"); }) }