Test the vga buffer module through a print_something function

This commit is contained in:
Philipp Oppermann
2019-01-25 12:26:05 +01:00
parent 27f2c4c2ff
commit d71e6a7cb6
2 changed files with 13 additions and 10 deletions

View File

@@ -85,3 +85,15 @@ impl Writer {
fn new_line(&mut self) {/* TODO */}
}
pub fn print_something() {
let mut writer = Writer {
column_position: 0,
color_code: ColorCode::new(Color::Yellow, Color::Black),
buffer: unsafe { &mut *(0xb8000 as *mut Buffer) },
};
writer.write_byte(b'H');
writer.write_string("ello ");
writer.write_string("Wörld!");
}