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]
mov cl,1
cmp bl,cl
jb L2
L1:
mov si,cx
add si,1
mov dl,buffer[si]
mov ah,02h
int 21h
push dl
inc cl
cmp bl,cl
jae L1
mov dl,0ah
mov ah,02h
int 21h
lea dx,str3
mov ah,09h
int 21h
mov cl,1
cmp bl,cl
jb L2
L3:pop dl
mov ah,02h
int 21h
inc cl
cmp bl,cl
jae L3
L2:mov ah,4ch
int 21h
start endp
code ends
end start
最后
以上就是轻松楼房最近收集整理的关于汇编--21H里头0ah功能的使用示例的全部内容,更多相关汇编--21H里头0ah功能内容请搜索靠谱客的其他文章。
发表评论 取消回复