Say I'm writing a routine in x86 assembly, like, "add" which adds two numbers passed as arguments.
For the most part this is a very simple method:
push ebp
mov ebp, esp
mov eax, [ebp+8]
add eax, [ebp+12]
mov esp, ebp
pop ebp
ret
But, is there any way I could rewrite this method to avoid the use of the "ret" instruction and still have it produce the exact same result?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…