From e4f84aadc0145993de175cf7a64702e245478bd9 Mon Sep 17 00:00:00 2001 From: Erin Date: Mon, 12 Jun 2023 00:39:50 +0200 Subject: [PATCH] assembly --- spec.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spec.md b/spec.md index 64ecd1c6..cf2c1e04 100644 --- a/spec.md +++ b/spec.md @@ -239,3 +239,14 @@ | StoreAccessEx | Accessed address | Storing to invalid address | | InvalidOpcode | Loaded opcode | Executing invalid opcode | | Ecall | None | Ecall instruction | + +# Assembly +HoleyBytes assembly format is not defined, this is just a weak description +of `hbasm` syntax. + +- Opcode names correspond to specified opcode names, lowercase (`nop`) +- Parameters are separated by comma (`addi r0, 1`) +- Instructions are separated by either line feed or semicolon +- Registers are represented by `r` followed by the number (`r10`) +- Labels are defined by label name followed with colon (`loop:`) +- Labels are references simply by their name (`print`)