VM II Discussion

  1. When a function is called, how are arguments passed? At least two parts of VM code share the responsibility. Illustrate your explanation using a specific example.

  2. Suppose that a function ken calls a function bar. After the function bar finishes, execution needs to return to the place in ken that called it.

    1. What does the caller (ken) do to make it possible for control to go to the call site after bar finishes?
    2. What does the callee (bar) do in order to get the execution to continue in ken? Do not include any extraneous details! Just stick with the basics.
    3. Why is this necessary? Why not take the code that needs to happen next and just put it after the assembly for the function bar?
Last modified January 31, 2025: Freezing all important files. (6de54e3)