assume cs:code,ds:data,ss:stack
data segment
dw 1111h,2222h,3333h,4444h,5555h,6666h,7777h,8888h,9999h,0000h,0aaaah
dw 0bbbbh,0cccch,0ddddh,0eeeeh,0ffffh
dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data ends
stack segment
dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
stack ends
code segment
start:
mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
sub bx,bx
mov cx,10h
mov sp,21h
instack:
push ds:[bx]
add bx,2
loop instack
mov cx,10h
outstack:
pop ds:[bx]
add bx,2
loop outstack
mov ax,4c00h
int 21h
code ends
end start