assume cs:code
a segment
db 1,2,3,4,5,6,7,8
a ends
b segment
db 1,2,3,4,5,6,7,8
b ends
c segment
db 0,0,0,0,0,0,0,0
c ends
code segment
start:
mov cx , 8
mov bx , 0
s:mov dl , 0
mov ax , a
mov ds , ax
add dl , ds:[bx]
mov ax , b
mov ds , ax
add dl , ds:[bx]
mov ax , c
mov ds , ax
add ds:[bx] , dl
inc bx
loop s
MOV AX,4C00H
INT 21H
code ends
end start
![](https://i-blog.csdnimg.cn/blog_migrate/cd3869ebf139ba9b3b3c8ebc0e068a2b.jpeg)
assume cs:code
a segment
dw 1,2,3,4,5,6,7,8
a ends
b segment
dw 0,0,0,0,0,0,0,0
b ends
code segment
start:
mov ax , b
mov ss , ax
mov sp , 10h
mov ax , a
mov ds , ax
mov bx , 0
mov cx , 8
s: push ds:[bx]
add bx , 2
loop s
MOV AX,4C00H
INT 21H
code ends
end start
![](https://i-blog.csdnimg.cn/blog_migrate/c38a3e0151fdf6872a516b34b52215c4.jpeg)