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