Advertisement
lukhavi

ReferenciasEnMSVS_asm

Apr 30th, 2020
1,358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;int a = 10;
  2. ;int& ref_a = a;
  3. ;ref_a = 11;
  4.  
  5. ;a vive en (ebp +_a)
  6. ;ref_a vive en (ebp +_ref_a)
  7.  
  8. mov DWORD PTR _a$[ebp], 10  ; 0000000aH // push 10 en (ebp +_a)
  9. lea eax, DWORD PTR _a$[ebp] ;           // load address (ebp +_a) en eax
  10. mov DWORD PTR _ref_a$[ebp], eax;        // push eax en (ebp +_ref_a) i.e. (ebp +_a)
  11. mov ecx, DWORD PTR _ref_a$[ebp];        // mov ecx,DWORD PTR [ebp +_ref_a]; i.e. load (ebp + _a) en ecx  
  12. mov DWORD PTR [ecx], 11 ; 0000000bH     // mov DWORD PTR [ebp+_a],11; i.e. push 11 en (ebp +_a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement