CAPC - Part 9


The ALU Unit
I combined my ALU combination circuit with 3 16-bit registers to create the ALU unit, and then wired the various register controls to the signal bus.

The ADD Instruction
Next, I created the operation logic for the ADD instruction inside the OpLogic device.

Finally, I spent an hour fixing everything that was broken. I placed two of the registers in backwards, I misnamed an output wire in the OpLogic device and the ALU combinational circuit was malfunctioning. I never figured out why the ALU had malfunctioned. I disconnected it from the processor and hooked it up to hex displays and keyboards and saw that it was indeed failing. Then I rebuilt another one beside it that was exactly the same and was dumbfounded to see that it did work while the identical one beside it didn't.

I gave up on trying to figure it out and simply copied and pasted the working one back onto the processor after which my ADD instruction worked beautifully. I ran these two test programs while working on it:

ADD Test Program
FFFF 6009 700B 600A 700C 100B 700D 0000
0000 ABCD 1234 0000 0000 0000

Simpler ADD Test Program
6004 1005 7006 0000 1111 2222 0000

back to CAPC...