回 帖 发 新 帖 刷新版面

主题:[讨论]请问调用子函数怎么会提示出错?

.if eax==1001 
mov eax,wParam 
.if eax==1001 
mov bz,0 
.if eax==1002 
mov bz,1 
invoke mm,addr s1,addr s2,bz  这里在调用的时候提示出错了,但又不知道哪里出问题了。



mm proc s1:DB,s2:db,bz:db   这句提示出错:
                            instruction or register not accepted in current CPU mode 
cmp bz,0 
je jiami 
jmp jiemi 
jiami: 
mov esi,offset s 
mov s1,[esi]   这里提示:invalid instruction operands 
shl s1,1 
add s1,3 
inc [esi]   这里提示:instruction operand must have size 
cmp [esi],0   这里提示:invalid instruction operands 
je L2 
jmp jiami 
jiemi: 
mov esi,offset s1 
mov s2,[esi]   也是:invalid instruction operands 
sub s2,3 
shr s2,1 
inc [esi]   这里提示:instruction operand must have size 
cmp [esi],0   也是: invalid instruction operands 
je L2 
jmp jiemi 
L2:ret 
mm endp   这里提示:instruction or register not accepted in current CPU mode 

数据在这里 
s DB "hello",0 
s1 db 20 dup(?) 
s2 db 20 dup(?) 
bz db ? 
请问到底是哪里出问题了,怎么用mov s1,esi会提示出错呢?子函数应该怎么调用,我现在刚学汇编不久很多都看不懂,希望有人帮忙解释一下,感激不尽.

回复列表 (共2个回复)

沙发

怎么没人帮一下忙吗?难道问得太深了?!

板凳

在那个论坛回复过了:)

我来回复

您尚未登录,请登录后再回复。点此登录或注册