Advertisement
artur99

ASM Suma elementelor dintr-un vector

Jan 24th, 2018
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. int addArray(int *, int) {
  2. _asm {
  3. mov edx, 0;
  4. mov eax, [ebp + 8]
  5. mov ebx, [ebp + 12]
  6. mov ecx, 0
  7.  
  8. _while:
  9. cmp ecx, ebx
  10. je _endwhile
  11. add edx, [eax + ecx * 4]
  12. inc ecx
  13. jmp _while
  14. _endwhile:
  15.  
  16. mov eax, edx
  17.  
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement