diff --git a/spec.md b/spec.md index 64ecd1c..cf2c1e0 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`)