Here is where I ran into a bunch of problems, most of them related to
LogicWorks4.0
First I had to create a 4x16 decoder to be used to carry
out the instructions. I created the decoder, and everything went fine, but when
I was testing the circuit, it wouldn't work. I redid the decoder and still it
wouldn't work. Then I discovered the problem: LogicWorks4.0 wasn't properly
saving the generic 3x8 decoders (w/o Inverse) I was using to build the 4x16
decoder. Every time I would open the symbol to edit it, I would get an error
that some part could not be loaded. So I had to replace the 3x8 decoders (w/o
Inverse) with Inverted 3x8 decoders. So I had to throw a not gate on every
single input and output to get the desired result. Finally the circuit would
work properly and the instruction would make it through. Here is the final
result of the 4x16 decoder:
Here is the whole schematic for lab5, finally working:
However, after every instruction, the hex displays I put in for debugging
read X X X X as can be seen in the diagram. I'm not sure if it's meant to be
like that or not, hopefully it won't cause problems.