I have a question about how process state would be saved during a context switch.
Given a relatively simple design for a CPU using von Neumann style architecture, how is the process image saved without overriding some of that state in the process?
For example, if I want to save the current state of all registers including the program and memory address registers, how can I write them to a memory location without overriding the stack and base pointers in the process?
Is there auxiliary hardware that holds intermediate values, and if so what does it look like in a more simple sense compared to the industry standard?