enter protected mode and jump to rust binary

This commit is contained in:
pantonshire committed 2024-08-26 20:05:24 +01:00
1 parent e20030fbc3
commit a86d73e6ee
4 files changed
+343 -13

No files matched your search

+4 -7
View File
@@ -10,9 +10,9 @@ const VGA_ADDR: usize = 0xb8000;
const STR: &[u8] = b"the quick brown fox jumps over the lazy dog";
extern "C" {
fn prelude() -> !;
}
// extern "C" {
// fn prelude() -> !;
// }
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
@@ -45,10 +45,7 @@ pub extern "C" fn _start() -> ! {
vga_buf[i] = 0x1f00 | u16::from(b);
}
vga_buf[0] = 0x1f02; //smiley
// hlt()
unsafe { prelude() };
hlt()
}
#[inline]