## Supported Runtime Script commands in Moon OS prt, let, slp, inp, rnd add, sub, mul, div, mod jmp, jeq, jne, jgt, jlt int, str, typ, prs, tim len, pol, pop, psh put, get, key, del clr, drw, pxl def, end, ret, cal ife, ifg, els, fin for, nxt ~ only in Moon OS: lib [$V*] [N?] ~ extensions needed in host blk: pause VM, e.g. waiting for a key press con: term sequence, e.g. text colors, moving cursors led: set status of LEDs log: output debugging information net: send HTTP requests ## Moon OS lib APIs os.get_home_path (path) os.get_current_path (path) os.set_current_path ($path) os.delete_path ($path) os.make_dir ($path, $name) os.get_file_list ($path) os.get_file_type ($path, $name, type_str) os.read_file ($path, $name, content) os.write_file ($path, $name, $content) os.get_os_info (info) os.get_sys_info (info) os.get_env_var ($name, name) os.set_env_var ($var_name, $var_val) util.get_path_by_str ($path_str, $is_file, $skip_verify, path) util.get_real_path ($path, path) util.verify_path ($path, $is_file, is_valid) util.wrap_words ($text, $width, lines) dev.set_led ($idx, $val) net.http ($params{method,url,data,withCredentials}, res) term.prev_line term.clear_line term.clear_screen term.alternate_buffer term.primary_buffer term.color_print ($text, $fg_color, $bg_color) term.set_prt_delay ($enable) term.get_width (width) term.get_height (height) term.move_cursor ($dx, $dy) term.set_cursor_position ($line, $column) term.read_key (keycode) term.get_key_pressed (keycode) ## Runtime Script resources Tutorial: https://siwei.dev/doc/runtime/ Cheatsheet: https://siwei.dev/doc/RuntimeScriptCheatSheet.pdf