Skip to content

CS 2810 - Project #3

Write a MIPS assembly language procedure that implements the Towers of Hanoi recursive function given the following declaration:

void towers(int n, char source, char dest, char spare); 

The function outputs a message describing each move. The source, destination, and spare poles are indicated with a character identifier of your choosing ('A', 'B', 'C' are common. If you need help with the C++ version of the function, come see me.). Write a MIPS assembly language program that demonstrates the Towers of Hanoi function. Your program should ask the user for the number of disks. The program should repeat until the user enters an integer less than 1 for the number of disks. All procedures should have a procedure frame and adhere to the procedure call convention. Name your file LlllProj03.asm.