Close

Subtract and Halt Instructions

A project log for BREDSAC

Electronic Dynamic Storage Breadboard Computer

gregewinggreg.ewing 06/19/2018 at 12:550 Comments

Subtract

Microcode for the Subtract and Subtract Long instructions is very similar to the Add instructions, the only differences being the activation of CMX and CY1.

# OPCODE L STAT : FETCH MASEL SHS EOI RFA1 WRF1 XSEL YSEL CMX AND CY1 CYP ODD MSW LSW

# S - Subtract
   01100 0 0001 :   0     1    0   1   110   1   01   10   1   0   1   0   0   1   1

   01100 1 0001 :   0     1    0   0   010   1   01   10   1   0   1   0   0   0   1
   01100 1 0010 :   0     1    0   1   110   1   01   10   1   0   0   1   1   1   0

Halt

To facilitate running test programs of more than one or two instructions, it seemed like it would be helpful to implement the Halt instruction next. I added a HALT control signal that becomes a new input to the Run Control subcircuit. I also tidied up the Run Control logic a bit, renaming some of its inputs for consistency, and moving generation of the LAST signal from the main circuit into the Run Control subcircuit.

This is the new Run Control circuit:

This is how it fits into the main circuit:

Microcode for the Halt instruction is now straightforward.

# OPCODE L STAT : FETCH MASEL SHS EOI RFA1 WRF1 XSEL YSEL CMX AND CY1 CYP ODD MSW LSW HALT

# Z - Halt
   01101 0 0001 :   0     0    0   1   000   0   00   00   0   0   0   0   0   0   0   1

Discussions