Question: You may work within your Atari programming groups to complete this assignment for up to 50 points of extra credit. You only need to turn
You may work within your Atari programming groups to complete this assignment for up to 50 points of extra credit. You only need to turn in one copy of the assignment.
In this program, you will write a solver for the famous Tower of HanoiLinks to an external site. puzzle.
Code along with the in-class examples to produce the 3-disk Tower of Hanoi program for the Apple I using the 6502 Coding Form.xlsxDownload 6502 Coding Form.xlsx
Add the following functionality to the program:
Prompt the user to enter the number of disks. (Note: For the sake of simplicity, we will let the user enter their number of disks in hexadecimal. That way you only need to read one character.)
If the user enters fewer than 3 disks, print a message and have them try again.
If the user enters more than 10 disks, print a message and have them try again.
Solve the problem for the number of disks the user entered.
When printing the answers, number each step.
Submit your assembly source file when you are done.
An example run of the program follows (with the number being entered by the user.)
How many disks? 2 That is not enough. Please try again. How many disks? 11 That is too many. Please try again. How many disks? 3 Solution 1. A to C 2. A to B 3. C to B 4. A to C 5. B to A 6. B to C 7. A to C
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
