From d0f80773522b2dec7c8f314934fecc1b8e203166 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Tue, 22 Jul 2025 14:48:40 -0400 Subject: 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 --- README.md | 4 ++-- 1 file 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` | -- cgit v1.2.3