Buffers
These mnemonics operate on Buffer objects. See CandleVM buffer opcodes for size, value, and bounds rules.
| CASM mnemonic | CandleVM opcode | Operands | Behavior |
|---|---|---|---|
buf_new | NewBuffer | destination, size | Creates a zero-filled buffer using the size in the source register. |
buf_len | BufferLen | destination, buffer | Writes the buffer's byte length to destination. |
buf_get | BufferGet | destination, buffer, index | Reads the byte at index into destination. |
buf_set | BufferSet | buffer, index, value | Writes the byte value at index. |