Intermediate
Assembly Language
Q86 / 100
What is a procedure prologue and epilogue in 64-bit code?
Correct! Well done.
Incorrect.
The correct answer is B) Prologue: PUSH RBP; MOV RBP, RSP; SUB RSP, n — saves frame and allocates locals. Epilogue: MOV RSP, RBP (or LEAVE); POP RBP; RET
B
Correct Answer
Prologue: PUSH RBP; MOV RBP, RSP; SUB RSP, n — saves frame and allocates locals. Epilogue: MOV RSP, RBP (or LEAVE); POP RBP; RET
Explanation
The prologue establishes the stack frame. The epilogue tears it down. Some leaf functions omit the frame pointer (RBP) for performance. RSP must be 16-byte aligned at CALL.
Progress
86/100