Fix the errors
This commit is contained in:
parent
a70b2ed826
commit
766c1bc992
1 changed files with 2 additions and 1 deletions
|
|
@ -107,6 +107,7 @@ operand. This is useful for very low level programming, where
|
|||
which register you use is important:
|
||||
|
||||
```
|
||||
# #![feature(asm)]
|
||||
# #[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
|
||||
# unsafe fn read_byte_in(port: u16) -> u8 {
|
||||
let result: u8;
|
||||
|
|
@ -163,5 +164,5 @@ unsafe {
|
|||
asm!("mov eax, 2" : "={eax}"(result) : : : "intel")
|
||||
}
|
||||
println!("eax is currently {}", result);
|
||||
# } }
|
||||
# }
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue