summaryrefslogtreecommitdiff
path: root/68kinst.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2014-10-15 00:26:57 -0700
committerMichael Pavone <pavone@retrodev.com>2014-10-15 00:26:57 -0700
commit1718b42809a67d9634b4cf5ac7126b03e3209386 (patch)
treee21a721c67632b91cfbe9a7258c21b5fca38f827 /68kinst.c
parent1d2175e51a7a56242b66f6498306ddd0b25c6d04 (diff)
Fix decoding of movec
Diffstat (limited to '68kinst.c')
-rw-r--r--68kinst.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/68kinst.c b/68kinst.c
index a719440..4842758 100644
--- a/68kinst.c
+++ b/68kinst.c
@@ -970,6 +970,7 @@ uint16_t * m68k_decode(uint16_t * istream, m68kinst * decoded, uint32_t address)
immed = *(++istream);
reg = immed >> 12 & 0x7;
opmode = immed & 0x8000 ? MODE_AREG : MODE_REG;
+ immed &= 0xFFF;
if (immed & 0x800) {
if (immed > MAX_HIGH_CR) {
decoded->op = M68K_INVALID;