1.源程序
assume cs:code,ss:copydata
a segment
dw 1,2,3,4,5,6,7,8,9,0ah,0bh,0ch,0dh,0eh,0fh,0ffh
a ends
b segment
dw 0,0,0,0,0,0,0,0
b ends
copydata segment
dw 0,0,0,0,0,0,0,0
copydata ends
code segment
start:
mov cx,8
mov bx,0
mov ax,a
mov ds,ax
mov ax,copydata
mov ss,ax
mov sp,16
mov ax,b
mov es,ax
s: push ds:[bx]
add bx,2
loop s
mov cx,8
mov bx,0
popData:
pop es:[bx]
add bx,2
loop popData
mov ax,4c00h
int 21h
code ends
end start