diff options
| author | Julian Blake Kongslie | 2022-11-05 12:53:29 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-11-05 12:53:29 -0700 |
| commit | 3ae7eb01fef89e420901d691389f76e0a210da3a (patch) | |
| tree | 9850376c64a7f44163dbb6e393e60045a100a10a /isa/decode.cpp | |
| parent | Implement RMF instruction (diff) | |
| download | biggolf-3ae7eb01fef89e420901d691389f76e0a210da3a.tar.xz | |
Fix implementation of IAC microinstruction
Diffstat (limited to '')
| -rw-r--r-- | isa/decode.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/isa/decode.cpp b/isa/decode.cpp index 6ab90fd..df263ad 100644 --- a/isa/decode.cpp +++ b/isa/decode.cpp | |||
| @@ -331,7 +331,8 @@ instruction_context decode(std::uint_fast32_t flags, unsigned int pc, unsigned i | |||
| 331 | if (cma) ctx.acc = ~ctx.acc.value() & 07777; | 331 | if (cma) ctx.acc = ~ctx.acc.value() & 07777; |
| 332 | if (cml) ctx.link = !ctx.link.value(); | 332 | if (cml) ctx.link = !ctx.link.value(); |
| 333 | if (iac) { | 333 | if (iac) { |
| 334 | if (++ctx.acc.value() == 0) ctx.link = !ctx.link.value(); | 334 | ctx.acc = (ctx.acc.value() + 1) & 07777; |
| 335 | if (ctx.acc.value() == 0) ctx.link = !ctx.link.value(); | ||
| 335 | } | 336 | } |
| 336 | if (rar && !ral) { | 337 | if (rar && !ral) { |
| 337 | unsigned int x = (ctx.link.value() << 12) | ctx.acc.value(); | 338 | unsigned int x = (ctx.link.value() << 12) | ctx.acc.value(); |
