summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Assembler.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Assembler.hs b/Assembler.hs
index 71fbb1b..6b5ae3e 100644
--- a/Assembler.hs
+++ b/Assembler.hs
@@ -152,7 +152,7 @@ mkWord inst dr sa sb = ((inst .&. 0x7F) `shift` 9)
-- Helper for bit mangling instructions using the sign extender
mkWordSE :: Word16 -> Word16 -> Word16 -> Word16
mkWordSE inst dr sa = ((inst .&. 0x7F) `shift` 9)
- .|. ((dr .&. 0x38) `shift` 6)
+ .|. ((dr .&. 0x38) `shift` 3)
.|. ((sa .&. 0x7) `shift` 3)
.|. (dr .&. 0x7)