Print “Hello” instead of “OK”

This commit is contained in:
Philipp Oppermann
2018-02-04 00:14:13 +01:00
parent 9fc0a07453
commit bff0c4401c
2 changed files with 20 additions and 8 deletions

View File

@@ -8,10 +8,16 @@ pub fn _start() -> ! {
// named `_start_` by default
let vga_buffer = 0xb8000 as *const u8 as *mut u8;
unsafe {
*vga_buffer.offset(0) = b'O';
*vga_buffer.offset(0) = b'H';
*vga_buffer.offset(1) = 0xa; // foreground color green
*vga_buffer.offset(2) = b'K';
*vga_buffer.offset(2) = b'e';
*vga_buffer.offset(3) = 0xa; // foreground color green
*vga_buffer.offset(4) = b'l';
*vga_buffer.offset(5) = 0xa;
*vga_buffer.offset(6) = b'l';
*vga_buffer.offset(7) = 0xa;
*vga_buffer.offset(8) = b'o';
*vga_buffer.offset(9) = 0xa;
}
loop {}