Aggregation time and space conversion

zhaozj2021-02-16  58

Regarding how to use the exchange of two variables directly to exchange two variables, known use ( / -, * ///, ^), etc., today, suddenly by a senior programmer, why Is there anything out? You know what is the result of using addition or multiplication or even different or. I immediately imagine what the assembly code of these codes will look like. After coming back, I tried it with VC7 and put the result here.

I believe when I should understand this line of code: ???? 27: ??? Int temp; ?????????????????????????????????????????????? ??????????????????????????????????????? Data [i] = data [i] ^ data [J ]; ??? 28: ??? Temp = Data [i]; ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????? 00411b86? MOV ?? Eax, DWORD PTR [I] 00411C82? MOV ??? Eax, DWORD PTR [I] ??????????? ?????????????????????????? 00411b89? MOV ?? ECX, DWORD PTR [DATA] 00411C85? MOV ??? ECX, DWORD PTR [DATA] ???????????????????? ??????????????C8c? MOV ?? EDX, DWORD PTR [J] 00411C88? MOV ??? EDX, DWORD PTR [ECX EAX * 4] ?????????? 00411b8f ? MOV ?? ESI, DWORD PTR [DATA] 00411C8B? MOV ??? DWORD PTR [TEMP], EDX ?????????????????? 00411b92? MOV ?? Eax, DWORD PTR [ECX EAX * 4] ??? 29: ??? Data [i] = data [j]; ???????????????????????????????????? ???????????????????????????????????????????? EAX, DWORD PTR [ESI EDX * 4] 00411C8E? MOV ??? Eax, DWORD PTR [I]? ?????????????????????????????????????????????????????????????????????????????? ECX, DWORD PTR [data] ?????????????????????????????? 00411b9b? MOV ?? EDX, DWORD PTR [DATA] 00411C94? MOV ??? EDX, DWORD PTR [J] ????? ?????????????????????????????? 00411b9e? MOV ?? DWORD PTR [EDX ECX * 4], EAX00411C97? MOV ??? ESI, DWORD PTR [DATA] ????????????????????? 16: ??? Data [J] = DATA [i ] ^ Data [J]; 00411C9A? MOV ??? EDX, DWORD PTR [ESI EDX * 4] ?????????? 00411ba1? MOV ?? Eax, DWORD PTR [I] 00411C9D? MOV ?? DWORD PTR [ECX EAX * 4], EDX ????????? 00411ba4? MOV ?? ECX, DWORD PTR [DATA] ??? 30: ??? Data [J] = Temp;?? ????????????????????????????????????????????????? 00411ba7? MOV? ? EDX, DWORD PTR [J] 00411CA0? MOV ??? Eax, DWORD PTR [J] ????????????????????????? 00411baa? MOV ?? ESI, DWORD PTR [DATA] 00411CA3? MOV ??? ECX, DWORD PTR [DATA] ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? * 4] 00411CA6? MOV ??? EDX, DWORD PTR [TEMP] ???????????????????????????? 00411bb0? Xor ?? Eax, DWORD PTR [ESI

转载请注明原文地址:https://www.9cbs.com/read-17462.html

New Post(0)