Add bytecode example to readme

This commit is contained in:
lash 2023-04-02 00:12:25 +01:00
parent c78f2a9c66
commit b108a6a700
Signed by untrusted user who does not match committer: lash
GPG Key ID: 21D2E7BB88C2A746

View File

@ -123,6 +123,20 @@ Template rendering is done using the `text/template` faciilty in the `golang` st
It expects all replacement symbols to be available at time of rendering, and has no tolerance for missing ones. It expects all replacement symbols to be available at time of rendering, and has no tolerance for missing ones.
## Bytecode examples
(Minimal, WIP)
```
0008 03666f6f 03626172 # INCMP "foo" "bar" - move to node "bar" if input is "FOO"
0001 0461696565 01 01 # CATCH "aiee" 1 1 - move to node "aiee" (and immediately halt) if input match flag is not set
0003 04616263 020104 # LOAD data from "abc" execution symbol, with a size limit of 260
0005 04616263 # MAP data from "abc" symbol for use with renderer (ok since "123" is under "abc")
0007 # HALT execution (require new input to continue)
0006 03313233 # MOVE to node "123" (regardless of input)
0007 # HALT execution
```
## Assembly language ## Assembly language
**TBD** **TBD**