Skip to content

Commit cc2509a

Browse files
committed
Improve comment in syscall example: fd 1 is stdout
1 parent edd036d commit cc2509a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

posts/inside-rust/2020-05-25-new-inline-asm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ fn main() {
6363
asm!(
6464
"syscall",
6565
in("rax") 1, // syscall number
66-
in("rdi") 1, // fd
66+
in("rdi") 1, // fd (stdout)
6767
in("rsi") buf.as_ptr(),
6868
in("rdx") buf.len(),
6969
out("rcx") _, // clobbered by syscalls

0 commit comments

Comments
 (0)