Exercise Link
-
The link to the exercise for students: Tracing Assembly Instructions (x86-64)
Instuctions/Suggestions for Use
This exercise presents students with one of our process "ask me another" runestone components from the Chapter 7 textbook exercises. This exercise version of the component has been set up with a common starting point question and includes instructions for students to follow.
This component question consists of of three assembly instructions and a machine state (register and memory values). The exercise asks students to show how each instruction affects the state of the machine when executed, one instruction at a time. The component updates the machine state after the correctly answered instruction execution before displaying the next instruction in the sequence for the student to answer.
The exercise starts with a fixed question that every student sees, with guided steps for the students to follow along to solve it. After solving the initial question, the instructions ask students to click the “Generate another question” button, which generates a new question of the same type for them to solve.
Note these features of this component as students work on this exercise:
-
The “Generate another question” feature procedurally generates new questions that are different across users.
-
The configuration options let a user to choose different types of instructions to be generated for the question, so that they can choose questions that have memory accesses instructions (
movor arithmentic with memory operands) and/or stack instructions (pushandpop). -
The "Help" button provides instructions and help for the user.
-
The "Reset" button allows a user to start over with the current question’s three instructions.
When to Use
This is an exercise that is best suited for coverage with section 7.1, 7.2and 7.3 of the textbook. It reinforces:
-
common instructions in x86-64 assembly.
-
the differences between accessing operands that are constants, registers, and memory.
-
how memory and registers are modified by a sequence of instruction executions.
How to use
You can deliver this exercise without demo’ing the component first, the preferred way, or you can demo the component to the students first, and then have them try out the exercise. If you demo the component, please demo the version with the Chapter 7 textbook exercises rather than demo’ing this exercise version one, as the starting exercise question and its instructions to students are fixed in the provided exercise. The "generate another question" feature will then generate new unique instances after this common starting question.
One suggestion is to have students:
-
Read through (or you can read through) the exercise instructions before starting.
-
Try the activity.
The link to the exercise for students: Tracing Assembly Instructions (x86-64)
Contact us
Please contact the Dive into Systems authors at authors@diveintosystems.org, with any typos, feedback, or questions about exercise.