From a1cdb3e59112eaa11b8639c8ab7ed3f1ef088515 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Fri, 21 Jan 2022 14:44:11 -0400 Subject: sux.h: Add bitmask for relative addressing. --- sux.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sux.h b/sux.h index fd313c5..1358192 100644 --- a/sux.h +++ b/sux.h @@ -1809,6 +1809,7 @@ static /*inline*/ void inst_##op(struct sux *cpu, uint8_t prefix, uint8_t size, t(0, 0x01000000, 0x01000000, 0x04000400, 0x00000000, 0x00000000, 0x40000000, 0x40000000, 0x00000000) { pre_idx = 1; } /* Set pre-index flag, for indexed indirect. */ \ t(0, 0x07101210, 0x17101410, 0x14001400, 0x10001000, 0x10000000, 0x40000000, 0x40000000, 0x00000000) { addr = ind_idx_addr(cpu, prefix, inc_clk, ZM, inc_pc, idx, pre_idx); } /* Indirect addressing, with indexing. */ \ t(7, 0x07561370, 0x17561570, 0x14161560, 0x10161160, 0x11161360, 0x51165161, 0x51175161, 0x01171160) { idx = 0; } /* Reset index. */ \ + t(0, 0x00010001, 0x00010001, 0x00010001, 0x00010001, 0x00010000, 0x00000000, 0x00000000, 0x00000000) { addr = rel_addr(cpu, prefix, inc_clk, inc_pc); } /* Relative addressing (used by conditonal branches). */ \ /* Load Source. */ \ t(0, 0x02220022, 0x03760576, 0x00320522, 0x00761166, 0x00660066, 0x00660066, 0x51665066, 0x00660066) { reg = &cpu->a; } /* Most operations use the accumulator as an operand */ \ t(0, 0x05540354, 0x04000000, 0x04000200, 0x02000000, 0x10000000, 0x51005000, 0x00000000, 0x04100110) { reg = &cpu->b; } /* ldb, stb, cpb, inb, deb, tba */ \ -- cgit v1.2.3-13-gbd6f