Files
Interpreter/examples/README.md
T
Admin 7c855b1618 文档同步双可执行架构:STCompiler + BytecodeExecutor。
- 12.10 重写为两条命令:STCompiler 编译出 .stb + sidecar,BytecodeExecutor 加载执行
- 12.0 删独立 stc.exe,12.13 依赖方向改为 STCompiler/BytecodeExecutor
- 指令与映像.md 新增「映像文件(.stb)与 sidecar」节,I/O 绑定不进映像
- host/ 改名 executor/,宿主入口.md 重写为执行器入口.md
- README / tests / examples / isa README 同步
2026-08-19 13:59:50 +08:00

19 lines
667 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# examples
给人看的样例工程,**不是** CMake 库。每个子目录是一份完整工程:`project.toml` + 若干 `.st`
`STCompiler` 编译、`BytecodeExecutor` 执行,用来跑通最小闭环。自动化断言放 `tests/`
## line1
计划中的最小样例:`MAIN` + `MotorStarter` FB + I/O。
| 文件 | 内容 |
|---|---|
| `project.toml` | `files` / `entry` / `gvl.file` / 可选 `io.*` |
| `globals.st` | 第一版唯一 GVL`VAR_GLOBAL`、I/Q |
| `motor.st` | `FUNCTION_BLOCK MotorStarter`,用 `VAR_EXTERNAL` 引用急停 |
| `main.st` | `PROGRAM MAIN`,实例化 FB,写 `Q0_0` |
不要在仓库根目录散放这些文件。