(D. Ida debugging function. Array (reverse)
I'm learning array today. I learned variables and functions last time. I want to add them today. Last time we called ABC in the main function, the function ABC returned to the next instruction in the main function. If you call def again, the next instruction in the main function will be returned after the execution of the function def. How is it implemented? We look at the stack. Before executing the call instruction in debugging, pay attention to the address of the next instruction and the top of the stack. Using F7 key to trace the call instruction to the function, it is found that the top of the stack moves up automatically, and the address of the next instruction has been pushed to the top of the stack. Press the F8 key to continue debugging, and the data at the top of the stack before the Retn instruction is restored to the instruction address. After Retn, the instruction address at the top of the stack is also out of the stack. Therefore, the call instruction first puts the instruction address into the stack, and then executes the instruction in the called function, while the Retn instruction returns there to execute according to the instruction address at the top of the stack.)