Taken SP25. Taught by Nils Napp.
Lecture 6: Function Calls and Program Memory Layout
Function Calls If we want to implement POP {R4}, we first store the value in the stack pointer to R4 then increment the stack pointer by 4 because the stack grows down. We can also do POP {PC}, which is equivalent to POP {Rx} followed by BX Rx. We can’t do POP LR because LR is not a lower register. PUSH Encoding With the PUSH encoding, we encode a list of registers using a one-hot encoding to save instructions....