3 io.write(string.format(...))
6 io.write("Hi world from example client in LUA\n");
8 server = l4.re_cap_alloc();
9 printf("Alloced a cap: %x\n", server);
11 server = l4.re_get_env_cap("calc_server");
13 if not l4.cap_is_valid(server) then
14 printf("calc_server not found in namespace, err %d\n", res);
18 l4.utcb_mr_put(0, 0, 9, 3);
19 res = l4.ipc_call(server, l4.msgtag(0, 3, 0, 0), l4.timeout_never());
21 printf("SUB result: %d (IPC: %x)\n", l4.utcb_mr_get(0), res);
23 l4.utcb_mr_put(0, 1, 8);
24 res = l4.ipc_call(server, l4.msgtag(0, 2, 0, 0), l4.timeout_never());
26 printf("NEG result: %d (IPC: %x)\n", l4.utcb_mr_get(0), res);