May 2017
Intermediate to advanced
696 pages
33h 52m
English

The two parameters of the procedure sort, v and n, are in the parameter registers x10 and x11, and we assign register x19 to i and register x20 to j.
The procedure body consists of two nested for loops and a call to swap that includes parameters. Let’s unwrap the code from the outside to the middle.
The first translation step is the first for loop:
for (i = 0; i < n; i += 1) {
Recall that the C for statement has three parts: initialization, loop test, and iteration increment. It takes just one instruction to ...
Read now
Unlock full access