I am trying to design a (very) simple processor architecture. I am in the process of creating a basic instruction set for it, however I am not sure of the best ("best" meaning what most people use - to remove subjectiveness) way to implement some instructions.
Take an output
instruction for example, and say I want to output register a
or register b
- there are two ways that I know of to do this: have two different instructions, one for outputting a
and one for outputting b
, or it could be one instruction and depending on the next byte in memory (argument) it outputs either a
or b
.
What is the most common, or most efficient way of doing this?
Thanks in advance.
P.S. This is my first question, so if I've done something terribly wrong point it out and I'll try to fix it.