|
|
@ -74,6 +74,12 @@ impl Writer {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub fn write_str(&mut self, s: &str) {
|
|
|
|
|
|
|
|
for byte in s.bytes() {
|
|
|
|
|
|
|
|
self.write_byte(byte)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn buffer(&mut self) -> &mut Buffer {
|
|
|
|
fn buffer(&mut self) -> &mut Buffer {
|
|
|
|
unsafe{ self.buffer.as_mut() }
|
|
|
|
unsafe{ self.buffer.as_mut() }
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -88,5 +94,5 @@ pub fn print_something() {
|
|
|
|
buffer: unsafe { Unique::new(0xb8000 as *mut _) },
|
|
|
|
buffer: unsafe { Unique::new(0xb8000 as *mut _) },
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
writer.write_byte(b'H');
|
|
|
|
writer.write_str("Hello!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|