5.22 · exercise

stack of plates

Four plates go into the frame, and they come back out top-first: store 21, 34, 55, 89 into the four named stack slots, then load and print them in reverse order.

The starter's frame is already sized with the course's alignment formula, and each slot has a named offset. Your job is the strs going in and the ldrs coming out; the printing order is what makes it a stack.

what is checked

  • four lines: 89, 55, 34, 21
  • the program exits cleanly
  • the values make a round trip through memory (str and ldr both present)

Specification

args
stdoutprints the expected output
exitexits with the expected code
sourceuses str
sourceuses ldr

Checked by running your program against expected behavior, never by matching a stored solution.

loading editor...
Open in playground