summaryrefslogtreecommitdiff
path: root/mnemonics.c
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2017-01-14 16:18:16 -0600
committerBobby Bingham <koorogi@koorogi.info>2017-01-15 23:19:28 -0600
commitf91057644c1f1813bf1373b5158e6b658210d570 (patch)
tree690913e6f3cf6173e1be867f950135f5f4e1df94 /mnemonics.c
parent3ec0ba288f355c717f1449625bc0aba3c4c9b104 (diff)
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.
Diffstat (limited to 'mnemonics.c')
-rw-r--r--mnemonics.c2
1 files changed, 1 insertions, 1 deletions
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 */
};