From 475ba5cf7fbf7efd39c18a4286e9a27545d63c9c Mon Sep 17 00:00:00 2001 From: John Adler Date: Wed, 5 May 2021 16:47:30 -0400 Subject: [PATCH] Add MOVE opcode. (#158) --- specs/vm/opcodes.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/specs/vm/opcodes.md b/specs/vm/opcodes.md index 163945a0..52fed5a2 100644 --- a/specs/vm/opcodes.md +++ b/specs/vm/opcodes.md @@ -343,6 +343,22 @@ If `imm == 0`, both `$rA` and `$of` are cleared and `$err` is set to `true`. Otherwise, `$of` and `$err` are cleared. +### MOVE: Move + +| | | +|-------------|------------------------------------| +| Description | Copy from one register to another. | +| Operation | ```$rA = $rB;``` | +| Syntax | `move $rA, $rB` | +| Encoding | `0x00 rA rB - -` | +| Notes | | + +Panic if: + +- `$rA` is a [reserved register](./main.md#semantics) + +`$of` and `$err` are cleared. + ### MUL: Multiply | | |