title: Recursive Ackermann-Peter Function in x86 Assembly (NASM)
body: <p>im trying to implement the recursive Ackermann-Peter-Function in x86 NASM-Assembly. The Function is defined as follows:</p>
  
  <p>*a(0;m) = m + 1</p>
  
  <p>*a(n + 1; 0) = a(n; 1)</p>
  
  <p>*a(n + 1;m + 1)) = a(n; a(n + 1;m))</p>
  
  <p>My Problem is i can't even imagine how to start properly. By now i only implemented an "power of x" Function recursively in Assembly.</p>
  
  <p>Here is what i have so far:
  <a href="http://pastebin.com/rsWALyCq" rel="nofollow">http://pastebin.com/rsWALyCq</a> (The german prompts just ask for n and m)</p>
  
  <p>Im thankfull for every bit of help i can get with this one.</p>
  
  <p>--</p>
  
  <p>SO i made the push/pop Statements Symetric now, but still get an Segmentation fault. I tried to debug the whole thing and placed a Debug-Message inside the firstcase. I compiled the Program and tried it with n=0 and m=0 and hes not printing the Debug-Message, so he isnt even entering the firstcase. I can't seem to manage to find out why hes not doing it.</p>
  
  <p>Heres my current try:
  <a href="http://pastebin.com/D4jg7JGV" rel="nofollow">http://pastebin.com/D4jg7JGV</a></p>