git ssb

0+

wanderer🌟 / js-primea-hypervisor



Tree: 3c4a2d1f6298f7d8b4e012acbb8edd52f1bf5203

Files: 3c4a2d1f6298f7d8b4e012acbb8edd52f1bf5203 / tests / interface / call.wast

817 bytesRaw
1;; starts with an address of 5d48c1018904a172886829bbbd9c6f4a2d06c47b
2(module
3 (memory 1)
4
5 (import $call "ethereum" "call" (param i32 i32 i32 i32 i32 i32 i32 i32) (result i32))
6 (export "a" memory)
7 (export "main" 0)
8 (func
9 (block
10 ;; Memory layout:
11 ;; 0 - 20 bytes: address (4)
12 ;; 20 - 52 bytes: value (0)
13 ;; 52 - 56 bytes: data (0x42004200)
14 ;; 56 - 60 bytes: result
15 (i32.store (i32.const 0) (i32.const 0x4))
16 (i32.store (i32.const 52) (i32.const 0x42004200))
17 (call_import $call (i32.const 2000) (i32.const 0) (i32.const 20) (i32.const 52) (i32.const 4) (i32.const 56) (i32.const 4) (i32.const 1))
18 )
19 )
20
21 (export "1" 1)
22 (func (param $result i32)
23 (if (i32.eq (i32.const 1) (get_local $result))
24 (return)
25 )
26 (unreachable)
27 )
28)
29

Built with git-ssb-web