Advertisement
JuanDark24

Untitled

Dec 16th, 2021
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .386
  2. .model flat, stdcall
  3. option casemap : none
  4. .data
  5. array DWORD 10, 20, 30, 40
  6. .code
  7. start:
  8.     ;write your code here  
  9.     mov edi, OFFSET array                            
  10.     mov ecx, LENGTHOF array                                      
  11.     mov eax, [edi]  
  12.                                        
  13.     Ciclo:    
  14.         mov edx, [edi]                                    
  15.         mov [edi], eax                                    
  16.         mov eax, edx                                      
  17.         add edi, TYPE array        
  18.     loop Ciclo
  19.  
  20.     mov edi, OFFSET array
  21.     mov [edi], eax  
  22.    
  23.     mov eax, [edi]      ;40
  24.     mov eax, [edi]+4    ;10
  25.     mov eax, [edi]+8    ;20
  26.     mov eax, [edi]+12   ;30                                
  27.    
  28.     ret
  29.     END start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement