summaryrefslogtreecommitdiff
path: root/isa
diff options
context:
space:
mode:
Diffstat (limited to 'isa')
-rw-r--r--isa/decode.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/isa/decode.cpp b/isa/decode.cpp
index c35118b..af38c64 100644
--- a/isa/decode.cpp
+++ b/isa/decode.cpp
@@ -34,8 +34,8 @@ instruction_context decode(unsigned int dfifb, unsigned int pc, unsigned int bit
34 inst.need_write_acc = true; 34 inst.need_write_acc = true;
35 inst.need_write_link = true; 35 inst.need_write_link = true;
36 inst.ef = [](auto &ctx) { 36 inst.ef = [](auto &ctx) {
37 unsigned int sum = (ctx.link.value() << 12) + ctx.acc.value() + ctx.data.value(); 37 unsigned int sum = ctx.acc.value() + ctx.data.value();
38 ctx.link = (sum >> 12) & 1; 38 ctx.link = ctx.link.value() ^ (sum >> 12);
39 ctx.acc = sum & 07777; 39 ctx.acc = sum & 07777;
40 }; 40 };
41 break; 41 break;