storage architecture
Summary
Operations using different architectures

C = A + B
| Stack | Accumulator | Register-register | Memory-memory |
|---|---|---|---|
push Apush Baddpop C | load Aadd Bstore C | load r1, Aload r2, Badd r3, r1, r2store C, r3 | add C, A, B |
Concept
Storage architecture
- where are the operands stored so that we can perform operations on them?
- where is the result stored afterwards?
- how to specify the operands
Common storage architectures
- Stack architecture
- operands are implicitly at the top of the stack
- Accumulator architecture
- one operand is implicitly in the accumulater(special register)
- General-purpose register architecture
- explicit operands
- Register-memory architecture
- operands in memory and registers
- Register-register/load-store
- Memory-memory
- operands in memory only