tag: operating-system os architecture is_child_of: operating-systems
CPU contains several registers to store intermediatery variables and other data which is frequently used. Some of the examples are,
- General registers that a programmer doesn’t have access to.
- Program counter which stores the address of next instruction to fetch.
- Stack pointer which points to the top of the stack in memory. Stack is used to store the procedure data such as arguments, what is the return address etc.
- PSW (Program Status Word) to store result of conditional instructions and some other information.