Your question is Pointers in Assembly. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
How are pointers represented and implemented in Assembly language?
Asked in the Technical Round stage. Follow-up discussion drilling into low-level pointer mechanics.
Implement simulate_pointer_ops(memory, operations), where a pointer is represented by an integer memory address. Support MOV, LEA, ADD, LOAD, STORE, and RETURN instructions. Return the final memory and values collected by RETURN.
memory is a list of integer cells. Each operation is a list of strings and integers. Registers are identified by names such as R1. LOAD dereferences an address stored in a register, while STORE writes through it.
R1def simulate_pointer_ops(memory, operations):