小编use*_*881的帖子

将此汇编代码移植到x64时,为什么会出现访问冲突?

我正在使用这个组件http://sourceforge.net/projects/tponguard/现在我需要在64位编译.我被困在这个集会中.

就像这样:

  push esi
  push edi

  mov  esi, eax         //esi = Mem1
  mov  edi, edx         //edi = Mem2

  push ecx              //save byte count
  shr  ecx, 2           //convert to dwords
  jz   @Continue

  cld
@Loop1:                 //xor dwords at a time
  mov  eax, [edi]
  xor  [esi], eax
  add  esi, 4
  add  edi, 4
  dec  ecx
  jnz  @Loop1

@Continue:              //handle remaining bytes (3 or less)
  pop  ecx
  and  ecx, 3
  jz   @Done

@Loop2:                 //xor remaining bytes
  mov  al, [edi]
  xor  [esi], al …
Run Code Online (Sandbox Code Playgroud)

delphi 64-bit assembly access-violation basm

3
推荐指数
1
解决办法
510
查看次数

标签 统计

64-bit ×1

access-violation ×1

assembly ×1

basm ×1

delphi ×1