Find limit of recursion: Difference between revisions

Content added Content deleted
(→‎{{header|Wren}}: Updated code to v0.4.0.)
m (Moved x86 Assembly entry into correct alphabetical order.)
Line 3,316: Line 3,316:
prompt$ echo $?
prompt$ echo $?
11</pre>
11</pre>

=={{header|x86 Assembly}}==

{{works with|nasm}}

<syntaxhighlight lang="asm"> global main

section .text

main
xor eax, eax
call recurse
ret

recurse
add eax, 1
call recurse
ret</syntaxhighlight>

I've used gdb and the command <tt>print $eax</tt> to know when the segmentation fault occurred. The result was 2094783.


=={{header|Wren}}==
=={{header|Wren}}==
Line 3,356: Line 3,336:
Segmentation fault (core dumped)
Segmentation fault (core dumped)
</pre>
</pre>

=={{header|x86 Assembly}}==

{{works with|nasm}}

<syntaxhighlight lang="asm"> global main

section .text

main
xor eax, eax
call recurse
ret

recurse
add eax, 1
call recurse
ret</syntaxhighlight>

I've used gdb and the command <tt>print $eax</tt> to know when the segmentation fault occurred. The result was 2094783.


=={{header|XPL0}}==
=={{header|XPL0}}==