1
0
Fork 0
forked from AbleOS/ableos
ableos/kernel/data/test.wat

37 lines
991 B
Plaintext
Raw Normal View History

2023-04-07 16:44:33 -05:00
(module
(data "mouse")
(data "x")
(data "y")
(func $rma (import "host" "read_mem_addr")(param i32)(result i32))
(func $co (import "host" "create_object")(param i32 i32)(result i64))
(func $roa (import "host" "read_object_attribute")(param i64 i32 i32)(result i32 i32))
(memory (export "memory") 1)
(func
(export "start")(result i32)
;; Copy into memory the object name
(memory.init 0
(i32.const 0) ;; target offset
(i32.const 0) ;; source offset
(i32.const 5))
(memory.init 1
(i32.const 6) ;; target offset
(i32.const 0) ;; source offset
(i32.const 1))
(memory.init 2
(i32.const 7) ;; target offset
(i32.const 0) ;; source offset
(i32.const 1))
i32.const 0
i32.const 5
call $co
i32.const 6
i32.const 1
call $roa
)
)