fasm

A good NASM/FASM tutorial? [closed]

不想你离开。 提交于 2019-11-27 09:11:21
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Does anyone know any good NASM or FASM tutorials? I am trying to learn assembler but I can't seem to find any good resources on it.

Loop with function call faster than an empty loop

五迷三道 提交于 2019-11-26 08:34:32
问题 I linked some assembly with some c to test the cost of a function call, with the following assembly and c source (using fasm and gcc respectively) assembly: format ELF public no_call as \"_no_call\" public normal_call as \"_normal_call\" section \'.text\' executable iter equ 100000000 no_call: mov ecx, iter @@: push ecx pop ecx dec ecx cmp ecx, 0 jne @b ret normal_function: ret normal_call: mov ecx, iter @@: push ecx call normal_function pop ecx dec ecx cmp ecx, 0 jne @b ret c source: