Skip to content

Commit

Permalink
chore: improve fd_write.wat
Browse files Browse the repository at this point in the history
  • Loading branch information
skanehira committed Jul 23, 2023
1 parent a6347d0 commit b3da5a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Binary file modified examples/fd_write.wasm
Binary file not shown.
8 changes: 5 additions & 3 deletions examples/fd_write.wat
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@
(local $iovec i32)

(i32.store (i32.const 16) (i32.const 0))
(i32.store (i32.const 20) (i32.const 14))
(i32.store (i32.const 20) (i32.const 7))
(i32.store (i32.const 24) (i32.const 7))
(i32.store (i32.const 28) (i32.const 7))

(local.set $iovec (i32.const 16))

(call $fd_write
(i32.const 1)
(local.get $iovec)
(i32.const 1)
(i32.const 24)
(i32.const 2)
(i32.const 28)
)
)
(export "_start" (func $write_hello_world))
Expand Down

0 comments on commit b3da5a8

Please sign in to comment.