1
0
Fork 0
forked from AbleOS/ableos
ableOS_v1Change/sysdata/test-programs/sds_test.rhai

19 lines
339 B
Plaintext
Raw Normal View History

2024-03-22 05:13:17 -05:00
fn create_buffer_protocol(string) {
let str = data::str("0" + string);
li8(r10, 0);
str(r10, r0, str, 1);
2024-03-22 03:58:59 -05:00
li64(r1, 3);
li64(r2, 0);
lra(r3, r0, str);
li64(r4, str.len);
eca();
}
2024-03-22 05:13:17 -05:00
create_buffer_protocol("protocol Math {\n\r"+
"\tfn add(i64, i64) -> i64;\n\r"+
"\tfn div(i64, i64) -> i64;\n\r"+
"}");
2024-03-22 03:58:59 -05:00
tx();