stacker segment stack
dw 250h dup(?)
top label word
stacker ends
data segment
str1 db 'please input a string no more than 250 characters',0dh,0ah,24h
str2 db 'the string you have input is',0dh,0ah,24h
str3 db 'the reserve output is',0dh,0ah,24h
buffer db 250
db ?
db 250 dup(?)
data ends
code segment
assume cs:code,ds:data,ss:stacker
start proc near
mov ax,stacker
mov ss,ax
lea sp,top
mov ax,data
mov ds,ax
lea dx,str1
mov ah,09h
int 21h
lea dx,buffer
mov ah,0ah
int 21h
mov dl,0ah
mov ah,02h
int 21h
lea dx,str2
mov ah,09h
int 21h
mov si,1
mov bl,buffer[si
dw 250h dup(?)
top label word
stacker ends
data segment
str1 db 'please input a string no more than 250 characters',0dh,0ah,24h
str2 db 'the string you have input is',0dh,0ah,24h
str3 db 'the reserve output is',0dh,0ah,24h
buffer db 250
db ?
db 250 dup(?)
data ends
code segment
assume cs:code,ds:data,ss:stacker
start proc near
mov ax,stacker
mov ss,ax
lea sp,top
mov ax,data
mov ds,ax
lea dx,str1
mov ah,09h
int 21h
lea dx,buffer
mov ah,0ah
int 21h
mov dl,0ah
mov ah,02h
int 21h
lea dx,str2
mov ah,09h
int 21h
mov si,1
mov bl,buffer[si