Solution

ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2015/digital-systems-linear-algebra-introduction-to-formal-proof/6/b/solution

Use two zero-address instructions for indirect access to computer memory. Define load to replace the top memory address by the value at that address, and define store to pop a value followed by the address just beneath it:
Both have no encoded address operand; the stack supplies it. If the known fixed memory addresses of the variables are , implement the assignment with
const p_x
const p_y
load
store
The successive stack suffixes are , then , then , then empty. Hence
The surrounding stack is restored. Other store conventions are possible, but the operand order must be stated and used consistently.

New to topics? Read the docs here!