AArch64, Recursion, GDB ======================= I have decided to write the recursive Tower of Hanoi algorithm in AArch64 assembly on Ubuntu. To call a recursive function, you better use a stack and push your arguments onto it. Locate them arguments later in an address relative to "sp". There's no push command, so you have to decrease "sp" by multiples of 16, and store values there. The assembly language does not know how many arguments are stored, so you better incres "sp" later. It has a main function named "main", the entry point. Since I assemble with "as", I link it later with "--entry=main". The recursive function that moves discs calls "printf" from the C library, so the full link command is: ld -o hanoi --entry=main -L/lib -L/usr/lib -lC hanoi.o Since I use "ld", the command to terminate the program is "bl exit". The program currently only prints the line for moving the first disc, but then the program does not exit until I press -C. So, I'm going to use the GNY debugger, gdb. That's easy: * To set a breakpoint, type "b" and the label name. * To display a register value, type "info r " * To execute the next step type "s". Now, as I start the debugger, I see that it is documented at http://www.gnu.org/software/gdb/documentation/