commit b108a6a7002188d8c17daa675190e41671c70ed2 parent c78f2a9c66461629e82362c3db2014451803cbcd Author: lash <dev@holbrook.no> Date: Sun, 2 Apr 2023 00:12:25 +0100 Add bytecode example to readme Diffstat:
M | README.md | | | 14 | ++++++++++++++ |
1 file changed, 14 insertions(+), 0 deletions(-)
diff --git a/README.md b/README.md @@ -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. +## 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 **TBD**