dseg segment array1dw1, 2, 3, 4, 5, 6, 7, 8, 9, 10 array2dw11, 12, 13, 14, 15, 16, 17, 18, 19, 20 sumdw10 dup(?)dseg endscseg segment assume ds:dseg, cs:csegSTART: mov ax, dseg mov ds, ax mov cx, lengthof array1 lea bx, array1 lea si, array2 lea di, sumloopadd: mov ax, [bx] add ax, [si] mov [di], ax add bx, 2 add si, 2 add di, 2 loop loopadd mov ah, 04ch int 21hcseg ends end START
dseg segment array1dw1, 2, 3, 4, 5, 6, 7, 8, 9, 10 array2dw11, 12, 13, 14, 15, 16, 17, 18, 19, 20 sumdw10 dup(?)dseg endscseg segment assume ds:dseg, cs:csegSTART: mov ax, dseg mov ds, ax mov cx, lengthof array1 lea bx, array1 lea si, array2 lea di, sumloopadd: mov ax, [bx] add ax, [si] mov [di], ax add bx, 2 add si, 2 add di, 2 loop loopadd mov ah, 04ch int 21hcseg ends end START