Repeat previous for post-08

This commit is contained in:
Pontus Lundström
2023-05-31 17:14:43 +03:00
parent 06dd5edb3f
commit cfd31a977d
4 changed files with 8 additions and 8 deletions

View File

@@ -322,7 +322,7 @@ pub extern "C" fn _start() -> ! {
blog_os::init();
// new
let ptr = 0xdeadbeaf as *mut u32;
let ptr = 0xdeadbeaf as *mut u8;
unsafe { *ptr = 42; }
// as before
@@ -347,7 +347,7 @@ pub extern "C" fn _start() -> ! {
```rust
// Note: The actual address might be different for you. Use the address that
// your page fault handler reports.
let ptr = 0x2031b2 as *mut u32;
let ptr = 0x2031b2 as *mut u8;
// read from a code page
unsafe { let x = *ptr; }

View File

@@ -329,7 +329,7 @@ pub extern "C" fn _start() -> ! {
blog_os::init();
// ここを追加
let ptr = 0xdeadbeaf as *mut u32;
let ptr = 0xdeadbeaf as *mut u8;
unsafe { *ptr = 42; }
// ここはこれまでと同じ
@@ -354,7 +354,7 @@ pub extern "C" fn _start() -> ! {
```rust
// 注意:実際のアドレスは個々人で違うかもしれません。
// あなたのページフォルトハンドラが報告した値を使ってください。
let ptr = 0x2031b2 as *mut u32;
let ptr = 0x2031b2 as *mut u8;
// コードページから読み込む
unsafe { let x = *ptr; }

View File

@@ -316,7 +316,7 @@ pub extern "C" fn _start() -> ! {
blog_os::init();
// new
let ptr = 0xdeadbeaf as *mut u32;
let ptr = 0xdeadbeaf as *mut u8;
unsafe { *ptr = 42; }
// as before
@@ -341,7 +341,7 @@ We see that the current instruction pointer is `0x2031b2`, so we know that this
```rust
// Note: The actual address might be different for you. Use the address that
// your page fault handler reports.
let ptr = 0x2031b2 as *mut u32;
let ptr = 0x2031b2 as *mut u8;
// read from a code page
unsafe { let x = *ptr; }

View File

@@ -325,7 +325,7 @@ pub extern "C" fn _start() -> ! {
blog_os::init();
// new
let ptr = 0xdeadbeaf as *mut u32;
let ptr = 0xdeadbeaf as *mut u8;
unsafe { *ptr = 42; }
// as before
@@ -350,7 +350,7 @@ pub extern "C" fn _start() -> ! {
```rust
// Note: The actual address might be different for you. Use the address that
// your page fault handler reports.
let ptr = 0x2031b2 as *mut u32;
let ptr = 0x2031b2 as *mut u8;
// read from a code page
unsafe { let x = *ptr; }