Adding ADDC and SUBB instructions

Posted on Sun 22 December 2019 in MUPS16 • Tagged with alu, instructions

Currently we don't have add-with-carry or subtract-with-borrow instructions, but they would be useful for doing 32-bit maths, and easy to implement. If nothing else, the ALU should support them in case I want to add them later.

Control unit changes

We need to add a carry flag to the control …


Continue reading

Redesigning the BZ/BNZ/SEQ/SNE instructions

Posted on Sun 22 December 2019 in MUPS16 • Tagged with alu, instructions

There are four instructions that need to do some kind of equality comparisons of registers:

  • BZ (branch if input register is zero)
  • BNZ (branch if input register is not zero)`
  • SEQ (set output register to 1 if both input registers are identical)
  • SNE (set output register to 1 if both …

Continue reading