Advertisement
JuanDark24

Untitled

Dec 14th, 2021
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .386
  2. .model flat, stdcall
  3. .data
  4. doubleArray dword  0,2,5,9,10
  5. count EQU (LENGTHOF doubleArray)
  6. total dword 0
  7. .code
  8. start:
  9.     ;write your code here
  10.     mov esi, OFFSET doubleArray    
  11.     mov ecx, count  
  12.    
  13.     L1:
  14.     mov eax,[esi]          
  15.     add esi, 4             
  16.     mov ebx,[esi]          
  17.        
  18.     sub ebx, eax           
  19.     add total, ebX
  20.     Loop L1  
  21.    
  22.     ret
  23.     END start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement