From f91057644c1f1813bf1373b5158e6b658210d570 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Sat, 14 Jan 2017 16:18:16 -0600 Subject: Switch addpc to use pc-offset instead of immediate operand This makes more sense, as the argument is really a signed offset from the program counter. --- mnemonics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mnemonics.c') diff --git a/mnemonics.c b/mnemonics.c index 4a21992..38a35f8 100644 --- a/mnemonics.c +++ b/mnemonics.c @@ -34,7 +34,7 @@ const struct mnemonic mnemonics[] = { { "ble", 0x6a00, { {PCOFF, 0}, } }, /* branch if less than or equal */ { "bra", 0x6e00, { {PCOFF, 0}, } }, /* branch always */ { "jmp", 0x7000, { {REGPTR, 5}, } }, /* branch always */ - { "addpc", 0x8000, { {REG, 9}, {IMM, 0} } }, /* add program counter and immediate */ + { "addpc", 0x8000, { {REG, 9}, {PCOFF, 0} } }, /* add program counter and immediate */ { "nop", 0xffff, { } }, /* no operation */ }; -- cgit v1.2.3