feat(bootloader): add bootable image

Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
This commit is contained in:
juju committed 2021-11-28 02:12:32 +01:00
1 parent 8ff78bbc02
commit 65a962361a
4 files changed
+29 -3

No files matched your search

+13
View File
@@ -7,8 +7,21 @@ fn panic(_info: &core::panic::PanicInfo) -> !
loop {}
}
static HELLO: &[u8] = b"Welcome to the JuliOS";
#[no_mangle]
pub extern "C" fn _start() -> !
{
let vga_buffer: *mut u8 = 0xb8000 as *mut u8;
for (i, &byte) in HELLO.iter().enumerate()
{
unsafe
{
*vga_buffer.offset(i as isize * 2) = byte;
*vga_buffer.offset(i as isize * 2 + 1) = 0xb;
}
}
loop {}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.