当前位置: 代码迷 >> 汇编语言 >> 刚学,函数返回异常
  详细解决方案

刚学,函数返回异常

热度:2765   发布时间:2013-02-26 00:00:00.0
刚学,函数返回错误
Assembly code
_ReplaceChar proc uses ecx eax esi edi ebx lpSrcStr,SrcSize,FromChar,ToChar    LOCAL    @ResultStr[sizeof lpSrcStr]:byte    LOCAL    @szBuffer[1024]:byte        pushad    invoke    RtlZeroMemory,addr @ResultStr,sizeof @ResultStr    mov    ecx,SrcSize        mov    esi,lpSrcStr        lea    edi,@ResultStr    xor    ebx,ebx_start:    ;invoke    wsprintf,addr @szBuffer,offset szFormatNumber,FromChar,ToChar,SrcSize,ebx,lpSrcStr,addr @ResultStr    ;invoke    MessageBox,NULL,addr @szBuffer,addr @ResultStr,MB_OK    cmp    ebx,SrcSize    je    _return        lodsb    cmp    eax,FromChar    je    _replace    stosb    inc    ebx    jmp    _start_replace:    mov    eax,ToChar    stosb    inc    ebx    jmp  _start    _return:    lea    eax,@ResultStr        popad    ret_ReplaceChar endp


------解决方案--------------------------------------------------------
同志, 用peter-bochs吧
------解决方案--------------------------------------------------------
lpSrcStr,SrcSize,FromChar,ToChar 需要写上类型吧
  相关解决方案