data segment
arr dw 10h,20h,30h,40h,50h
res dw 1 dup (0)
data ends
code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
lea si,arr
mov ax,[si]
mov cl,5
inc si
inc si
dec cl
l1:add ax,[si]
inc si
inc si
dec cl
jnz l1
mov res, ax
mov ah,4ch
int 21h
code ends
end start
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment