Find limit of recursion: Difference between revisions
m
Moved x86 Assembly entry into correct alphabetical order.
(→{{header|Wren}}: Updated code to v0.4.0.) |
m (Moved x86 Assembly entry into correct alphabetical order.) |
||
Line 3,316:
prompt$ echo $?
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}}==
Line 3,356 ⟶ 3,336:
Segmentation fault (core dumped)
</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}}==
|