汇编 ret出问题

来源:百度知道 编辑:UC知道 时间:2024/05/23 19:08:45
.386
.MODEL FLAT

ExitProcess PROTO NEAR32 stdcall, dwExitCode:DWORD

INCLUDE io.h

cr EQU 0dh
Lf EQU 0ah

.STACK 4096

.DATA
number1 DWORD ?
prompt BYTE "please enter number N",cr,Lf,0
message BYTE "the result is "
res DWORD ?
byte cr,Lf,0

.CODE
factroial PROC NEAR32

push ebp
mov ebp,esp
push eax
push ebx

cmp DWORD PTR [ebp+8],1
jne elsemore
dtoa res,ebx
output message
jmp endifone

elsemore: mov eax,[ebp+8]
imul ebx,eax
dec eax
push eax
call factroial
add esp,8

endifone:
pop ebx
pop eax
pop ebp
ret

factroial ENDP

_start: output prompt
input number1,16
atod number1
push eax<

我属于花朵
一旦打开,就使我心神烦乱,你所有的岁月
我就知道会有虚惊,
比大海有过之而无不及,
原来,我们早已谁都不是谁的谁。
他的的活平淡的如水哈哈

应该是堆栈的问题吧