This commit is contained in:
Jack Halford 2018-04-12 15:12:35 +02:00
parent 5f40aeeae5
commit 0849f24628
2 changed files with 6 additions and 5 deletions

View file

@ -51,7 +51,7 @@ pub fn kmain() -> ! {
// heap avalaible for tracking free'd frames // heap avalaible for tracking free'd frames
memory::init_noncore(); memory::init_noncore();
// x86::instructions::interrupts::int3(); x86::instructions::interrupts::int3();
// fn stack_overflow() { stack_overflow(); } // fn stack_overflow() { stack_overflow(); }
// stack_overflow(); // stack_overflow();

View file

@ -180,8 +180,10 @@ impl Writer {
} }
} }
for col in 0..BUFFER_COLS / 2 { for col in (0..BUFFER_COLS / 2).map(|x| x * 2) {
self.buffer[((BUFFER_ROWS - 1) * BUFFER_COLS) + (col * 2)] = b' '; self.buffer[((BUFFER_ROWS - 1) * BUFFER_COLS) + (col)] = b' ';
self.buffer[((BUFFER_ROWS - 1) * BUFFER_COLS) + (col + 1)] =
ColorCode::new(Color::White, Color::Black).0;
} }
self.buffer_pos = (BUFFER_ROWS - 1) * BUFFER_COLS; self.buffer_pos = (BUFFER_ROWS - 1) * BUFFER_COLS;
@ -200,7 +202,7 @@ impl fmt::Write for Writer {
} }
pub fn init() { pub fn init() {
set_color!(White, Cyan); set_color!(Yellow, Red);
print!( print!(
"{}{}{}{}{}{}{}{}{}{}{}{}{}{}", "{}{}{}{}{}{}{}{}{}{}{}{}{}{}",
format_args!("{: ^80}", r#" ,--, "#), format_args!("{: ^80}", r#" ,--, "#),
@ -218,7 +220,6 @@ pub fn init() {
format_args!("{: ^80}", r#" ' ,/ ; | .' "#), format_args!("{: ^80}", r#" ' ,/ ; | .' "#),
format_args!("{: ^80}", r#" '--' `---' "#) format_args!("{: ^80}", r#" '--' `---' "#)
); );
set_color!();
unsafe { unsafe {
VGA.prompt(); VGA.prompt();
} }