Update readme
This commit is contained in:
parent
719368301b
commit
12d2b577f0
20
README.md
20
README.md
@ -22,6 +22,7 @@ The VM defines the following opcode symbols:
|
|||||||
* `MOUT <choice> <display>` - Add menu display entry. Each entry should have a matching `INCMP` whose `arg` matches `choice`. `display` is a descriptive text of the menu item.
|
* `MOUT <choice> <display>` - Add menu display entry. Each entry should have a matching `INCMP` whose `arg` matches `choice`. `display` is a descriptive text of the menu item.
|
||||||
* `MNEXT <choice> <display>` - Define how to display the choice for advancing when browsing menu.
|
* `MNEXT <choice> <display>` - Define how to display the choice for advancing when browsing menu.
|
||||||
* `MPREV <choice> <display>` - Define how to display the choice for returning when browsing menu.
|
* `MPREV <choice> <display>` - Define how to display the choice for returning when browsing menu.
|
||||||
|
* `MSEP` - **Not yet implemented**. Marker for menu page separation. Incompatible with browseable nodes.
|
||||||
|
|
||||||
|
|
||||||
### External code
|
### External code
|
||||||
@ -79,20 +80,19 @@ To assist with menu creation, a few batch operation symbols have been made avail
|
|||||||
|
|
||||||
The fixed-size output is generated using a templating language, and a combination of one or more _max size_ properties, and an optional _sink_ property that will attempt to consume all remaining capacity of the rendered template.
|
The fixed-size output is generated using a templating language, and a combination of one or more _max size_ properties, and an optional _sink_ property that will attempt to consume all remaining capacity of the rendered template.
|
||||||
|
|
||||||
For example, in this example
|
In this example
|
||||||
|
|
||||||
- `maxOutputSize` is 256 bytes long.
|
- `maxOutputSize` is 256 bytes long.
|
||||||
- `template` is 120 bytes long.
|
- `template` is 120 bytes long.
|
||||||
- param `one` has max size 10 but uses 5.
|
- param `one` has max size 10 but uses 5.
|
||||||
- param `two` has max size 20 but uses 12.
|
- param `two` has max size 20 but uses 12.
|
||||||
- param `three` is a _sink_.
|
- param `three` is a _sink_.
|
||||||
|
- rendered menu is 15 bytes long.
|
||||||
|
|
||||||
The renderer may use up to `256 - 120 - 5 - 12 = 119` bytes from the _sink_ when rendering the output.
|
The renderer may use up to `256 - 120 - 5 - 12 - 15 = 104` bytes from the _sink_ when rendering the output.
|
||||||
|
|
||||||
|
|
||||||
### Menu rendering
|
### Menu browsing
|
||||||
|
|
||||||
The menu is appended to the template output.
|
|
||||||
|
|
||||||
A max size can be set for the menu, which will count towards the space available for the _template sink_.
|
A max size can be set for the menu, which will count towards the space available for the _template sink_.
|
||||||
|
|
||||||
@ -117,6 +117,8 @@ Multipage outputs, like listings, are handled using the _sink_ output constraint
|
|||||||
|
|
||||||
### Languages support
|
### Languages support
|
||||||
|
|
||||||
|
**Not yet implemeennted**
|
||||||
|
|
||||||
Language for rendering is determined at the top-level state.
|
Language for rendering is determined at the top-level state.
|
||||||
|
|
||||||
Lookups dependent on language are prefixed by either `ISO 639-1` or `ISO 639-3` language codes, followed by `:`.
|
Lookups dependent on language are prefixed by either `ISO 639-1` or `ISO 639-3` language codes, followed by `:`.
|
||||||
@ -147,11 +149,11 @@ In this reference implementation some constraints apply
|
|||||||
|
|
||||||
### Structure
|
### Structure
|
||||||
|
|
||||||
_TODO_: `state` will be separated into `cache` and `session`.
|
|
||||||
|
|
||||||
- `vm`: Defines instructions, and applies transformations according to the instructions.
|
- `vm`: Defines instructions, and applies transformations according to the instructions.
|
||||||
- `state`: Holds the code cache, contents cache aswell as error tates from code execution.
|
- `state`: Holds the bytecode buffer, error states and navigation states.
|
||||||
- `resource`: Retrieves data and bytecode from external symbols, and retrieves and renders templates.
|
- `cache`: Holds and manages all loaded content.
|
||||||
|
- `resource`: Retrieves data and bytecode from external symbols, and retrieves templates.
|
||||||
|
- `render`: Renders menu and templates, and enforces output size constraints.
|
||||||
- `engine`: Outermost interface. Orchestrates execution of bytecode against input.
|
- `engine`: Outermost interface. Orchestrates execution of bytecode against input.
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user