xFunKy

sumArray ASM

May 7th, 2012
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sumArray PROC
  2.     push ax
  3.     push cx
  4.     push si
  5.     mov cx, *** ;Length
  6.     mov ax, 0
  7.     lea si, arr
  8.     sum:
  9.     add ax, [si]
  10.     add si, {1 - Byte, 2 - Word}
  11.     loop sum
  12.     mov ans, ax
  13.     pop si
  14.     pop cx
  15.     pop ax
  16.     ret
  17. sumArray ENDP
Advertisement
Add Comment
Please, Sign In to add comment