Share the mass



  • Registers eax and ebx contain two 32-bit positive target numbers, edx - indicator for the 1st element of the mass of such numbers. As for the smallest number of instructions to exchange values [edx + eax * 4] and [edx + ebx * 4] A mass?

    Teams available intel x86, Windows



  • Mm. ♪ ♪

        mov  ecx, dword ptr [edx+eax*4]
        xchg ecx, dword ptr [edx+ebx*4]
        mov  dword ptr [edx+eax*4], ecx
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2