|
@@ -11,14 +11,16 @@
|
|
|
//! # Examples
|
|
|
//!
|
|
|
//! ```ignore
|
|
|
+//! #![feature(asm)]
|
|
|
+//!
|
|
|
//! use multiboot2::load;
|
|
|
//!
|
|
|
//! // The Multiboot 2 specification dictates that the machine state after the
|
|
|
//! // bootloader finishes its job will be that the boot information struct pointer
|
|
|
//! // is stored in the `EBX` register.
|
|
|
//! let multiboot_info_ptr: u32;
|
|
|
-//! unsafe { asm!("mov $2, %ebx" : "=r"(multiboot_info_ptr)) };
|
|
|
-//! let boot_info = unsafe { load(multiboot_info_ptr) };
|
|
|
+//! unsafe { asm!("mov {}, ebx", out(reg) multiboot_info_ptr) };
|
|
|
+//! let boot_info = unsafe { load(multiboot_info_ptr as usize) };
|
|
|
//! ```
|
|
|
|
|
|
use core::fmt;
|