Difference between revisions of "CSC231 Final Exam 2014"
Line 66: | Line 66: | ||
=Problem 6= | =Problem 6= | ||
<br /> | <br /> | ||
− | This question relates to the Tower of Hanoi | + | This question relates to the Tower of Hanoi problem above. Assume that you pass parameters to your moveDisk() function via registers, and not pushing them through the stack, |
− | and that you push eax, ebx, ecx, and edx at the beginning of moveDisk | + | and that you push eax, ebx, ecx, and edx at the beginning of moveDisk. Nothing else is pushed in moveDisk in addition to these four registers. |
How much stack space will your program need, approximately, when moving 32 disks (''N'' = 32)? | How much stack space will your program need, approximately, when moving 32 disks (''N'' = 32)? |