CAPC - Part 10


The XOR, OR, AND, NOT Instructions
I realized shortly after completing the ADD instruction that adding the other 4 instructions performed by the ALU could be done trivially. So I added some signal lines to the ALU and changed the ADD stuff in the OpLogic device into general ALU-use logic.

Then I used the following program to test that these five instructions worked:
6011 1012 7013 6011 2012 7014 6011 3012
7015 6011 4012 7016 6011 5012 7017 0000
0000 1234 725F 0000 0000 0000 0000 0000

After running the last line should change to this:
0000 1234 725F 8493 606B 727F 1214 EDCB

My output was correct except for the NOT instruction. From which I discovered that I had to swap the "MATH_XREG_LOAD" and "MATH_YREG_LOAD" lines in the OpLogic device because they were backwards. After that I got the results I wanted.

back to CAPC...