Time to start interfacing with the real world. This means that the CPU needs the ability to write data out and read data in. Put another way, it must be able to set pins high
and low
, and read the state of pins as either high
or low
. Time for some additional CPU commands
How about:
[set | clear] <pin>
.
read <pin>        (Acc <- pin)
.
I'm not convinced that the above is particularly flexible. For instance, I'll probably want to read and write whole bytes. But this highlights one of the huge advantages of using an HDL such as VHDL. It is very quick and easy to add, remove and modify features based on real world experiences.
Of course, the proper approach is to start with a set of requirements, but that smacks far to much of my day job ;-)