From 4a0f141ad8f284e276083da5efb689854c2e4a5b Mon Sep 17 00:00:00 2001 From: lash Date: Sun, 16 Apr 2023 12:46:48 +0100 Subject: [PATCH] Sort opcode section in readme --- README.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 1c2da8a..13c405f 100644 --- a/README.md +++ b/README.md @@ -8,22 +8,21 @@ Original motivation was to create a simple templating renderer for USSD clients, ## Opcodes -The VM defines the following opcode symbols: +The VM defines the following opcode symbols, alphabetically: -* `CATCH ` - Jump to symbol if signal is set (see `signals` below). -* `CROAK ` - Clear state and restart execution from top if signal is set (see `signals` below). -* `LOAD ` - Execute the code symbol `symbol` and cache the data, constrained to the given `size`. Can be exposed with `MAP` within scope, -* `RELOAD ` - Execute a code symbol already loaded by `LOAD` and cache the data, constrained to the previously given `size` for the same symbol. -* `MAP ` - Expose a code symbol previously loaded by `LOAD` to the rendering client. Roughly corresponds to the `global` directive in Python. -* `MOVE ` - Create a new execution frame, invalidating all previous `MAP` calls. +* `CATCH ` - Jump to symbol if signal is set (see `signals` below). If match, has same side-effect as move. +* `CROAK ` - Clear state and restart execution from top if signal is set (see `signals` below). If match, has same side-effect as move. * `HALT` - Stop execution. The remaining bytecode (typically, the routing code for the node) is returned to the invoking function. * `INCMP ` - Compare registered input to `arg`. If match, it has the same side-effects as `MOVE`. In addition, any consecutive `INCMP` matches will be ignored until `HALT` is called. -* `MOUT ` - Add menu display entry. Each entry should have a matching `INCMP` whose `arg` matches `choice`. `display` is a descriptive text of the menu item. +* `LOAD ` - Execute the code symbol `symbol` and cache the data, constrained to the given `size`. Can be exposed with `MAP` within scope. See "External code" below. +* `MAP ` - Expose a code symbol previously loaded by `LOAD` to the rendering client. Roughly corresponds to the `global` directive in Python. * `MNEXT ` - Define how to display the choice for advancing when browsing menu. +* `MOUT ` - Add menu display entry. Each entry should have a matching `INCMP` whose `arg` matches `choice`. `display` is a descriptive text of the menu item. +* `MOVE ` - Create a new execution frame, invalidating all previous `MAP` calls. * `MPREV ` - Define how to display the choice for returning when browsing menu. -* `MSIZE ` - **Not yet implemented**. Set min and max display size of menu part to `num` bytes. * `MSEP` - **Not yet implemented**. Marker for menu page separation. Incompatible with browseable nodes. - +* `MSIZE ` - **Not yet implemented**. Set min and max display size of menu part to `num` bytes. +* `RELOAD ` - Execute a code symbol already loaded by `LOAD` and cache the data, constrained to the previously given `size` for the same symbol. See "External code" below. ### External code