Difference between revisions of "CSC231 Final Exam 2014"

From dftwiki3
Jump to: navigation, search
Line 66: Line 66:
 
=Problem 6=
 
=Problem 6=
 
<br />
 
<br />
This question relates to the Tower of Hanoi program.  Assume that you pass parameters to your moveDisk() function via registers,  
+
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 nothing else is pushed in moveDisk in addition to these registers.
+
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)?

Revision as of 07:32, 11 December 2014

--D. Thiebaut (talk) 15:02, 9 December 2014 (EST)



...