If you were to build a processor that would be used to run any arbitrary program, what is the minimum set of instructions (ISA) you could get away with?
I was thinking:
-
ALU-ops (add, sub, mul, div)
-
Load reg,[address]
-
Store reg,[address]
-
Branch-if operation. Could have branch if not equal, if >, if < (branchif reg1, reg2, LABEL)
What do you think?
Technically, you only need One Instruction. It needs to do math and conditional branching. e.g. subtract and branch if negative.