我试图在一些操作后返回数字,但编译器返回 push esp , push num , pop esp , pop num 无效的指令操作数,虽然MASM 允许push {register} 。它使用Visual Studio(调试模式x64)在x64,MASM上运行。怎么了?
PUBLIC from_asm
EXTERN puts:PROC
EXTERN exit:PROC
.data
num dd ?
.code
from_asm PROC
mov EAX, not -30
or EAX,21
mov EBX, not 21
and EAX, EBX
or EAX, 23
mov num, eax
mov esp, dword ptr [num]
push esp
push num
call puts
pop num
pop esp
ret
from_asm ENDP
END
P.S。我检查过,在所有操作 EAX 和 num 包含数字31之后。