The Instruction Set Architecture (ISA) is the part of the processor that is visible to the programmer or compiler writer. The ISA serves as the boundary between software and hardware.
The 3 most common types of ISAs are:
- Stack - The operands are implicitly on top of the stack.
- Accumulator - One operand is implicitly the accumulator.
- General Purpose Register (GPR) - All operands are explicitely mentioned, they are either registers or memory locations.
Lets look at the assembly code of
C = A + B;
in all 3 architectures:
Stack Accumulator GPR PUSH A LOAD A LOAD R1,A PUSH B ADD B ADD R1,B ADD STORE C STORE R1,C POP C - -