5.97 · exercise

Basic quiz: subroutines

Open and closed subroutines, the argument and result registers, and how bl and ret carry the return address.

0 of 6 correct

Multiple choice

What is the primary advantage of using an open (inline) subroutine?

Multiple choice

A program uses the instruction bl to call a subroutine. What instruction would normally be used to return to the calling code?

Multiple choice

Under the AArch64 procedure call convention, where are the first eight integer or pointer arguments normally passed to a procedure?

Multiple choice

A subroutine uses a stack frame to keep track of its local data. Which register is conventionally used as the frame pointer in AArch64?

Multiple choice

What is a key characteristic of a closed subroutine?

Multiple choice

When a bl instruction calls a subroutine, what happens to the return address?