summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-07-22 14:48:40 -0400
committerIan Moffett <ian@osmora.org>2025-07-22 14:48:40 -0400
commitd0f80773522b2dec7c8f314934fecc1b8e203166 (patch)
tree3be963311cf7cf0990af97e10ac2684b6ffbeb5a
parent548ae74ff2cc056b575ab14a0804404ea20e6d72 (diff)
docs: 'br' and 'brl' should only have register ops
On a 64-bit machine, memory addresses are usually 64-bit values. However, OSMX64 encodes fixed-length 32-bit instructions which is wayy smaller than an address. Therefore it is only possible to stick it in a register and branch using the register as an operand. Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index cb24b36..81f34e1 100644
--- a/README.md
+++ b/README.md
@@ -168,8 +168,8 @@ Control flow instructions are used to control which instructions the CPU execute
| Mnemonic | Effect |
| -------------------------------------- | ----------------------------------------------- |
| `hlt` | Execution halted |
-| `br` dst: r/m/imm | `pc` = `dst` |
-| `brl` dst: r/m/imm | `rp` = `pc` + size of opcode, then `pc` = `dst` |
+| `br` dst: r | `pc` = `dst` |
+| `brl` dst: r | `rp` = `pc` + size of opcode, then `pc` = `dst` |
| `bret` | `pc` = `rp` |
| `beq` a: r/m, b: r/m/imm, dst: r/m/imm | Iff `a` = `b`, `pc` = `dst` |
| `bne` a: r/m, b: r/m/imm, dst: r/m/imm | Iff `a` != `b`, `pc` = `dst` |