The ROL and SHR Instructions
I wasn't able to find any instructions regarding the implementation of
these two instructions so I decided to build them as special registers.
I took the 16-bit register design I had from part 3 and moved the input
ports around.
ROL-16 Special Register
SHR-16 Special Register
Apart from some wiring mistakes that were easily fixed these final two
instructions worked perfectly. I wrote the following test program to try
them out:
; stores the results of ROL and SHR
; on the value 8241h into words 000B and 000C
6009 D000 700B 6009 E000 700C 0000 0000
0000 8241 0000 0000 0000 0000 0000 0000
; after running the last line should change to this:
0000 8241 0000 0482 C120 0000 0000 0000
back to CAPC...
|